Log of /branches/WIP-pyshapelib-bramz/test/test_xmlsupport.py
Parent Directory
|
Revision Log
Revision
1280 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 18:29:16 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_xmlsupport.py
File length: 4073 byte(s)
Diff to
previous 1268
* test/xmlsupport.py (SaxEventLister.startElementNS)
(SaxEventLister.endElementNS): Do not include the qname. Python
2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
is (presumably incorrectly) None, whereas it's a string with the
element name in the later versions.
* test/test_xmlsupport.py (TestEventList.test_even_list_simple)
(TestEventList.test_even_list_namespace): Update tests to reflect
the new behaviour
(TestEventList.test_even_list_id_normalization): Fix doc-string
Revision
1268 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 16:10:12 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_xmlsupport.py
File length: 4112 byte(s)
Diff to
previous 1257
* Resources/XML/thuban-0.8.dtd: New DTD for the new file format
version.
* Thuban/Model/save.py (sort_data_stores): New. Make topological
sort of the data sources so they can be written with sources that
data sources that depend on other data sources come after the
sources they depend on.
(SessionSaver.__init__): Add idmap instance variable to map from
objects to the ids used in the file.
(SessionSaver.get_id, SessionSaver.define_id)
(SessionSaver.has_id): New. Methods to manage the idmap
(SessionSaver.write): Use thuban-0.8.dtd
(SessionSaver.write_session): Add a namespace on the session and
write out the data sources before the maps.
(SessionSaver.write_data_containers): New. Write the data
containers.
(SessionSaver.write_layer): Layer elements now refer to a
shapestore and don't contain filenames anymore.
* Thuban/Model/load.py (LoadError): Exception class to raise when
errors in the files are discovered
(SessionLoader.__init__): Define dispatchers for elements with a
thuban-0.8 namespace too.
(SessionLoader.check_attrs): New helper method to check and
convert attributes
(AttrDesc): New. Helper class for SessionLoader.check_attrs
(SessionLoader.start_fileshapesource)
(SessionLoader.start_derivedshapesource)
(SessionLoader.start_filetable, SessionLoader.start_jointable):
Handlers for the new elements in the new fileformat
(SessionLoader.start_layer): Handle the shapestore attribute in
addition to filename.
(SessionLoader.start_table, SessionLoader.end_table): Removed.
They were never used in the old formats and aren't needed for the
new.
* Thuban/Model/session.py (Session.DataContainers): New method to
return all "data containers", i.e. shapestores and tables
* test/xmlsupport.py (SaxEventLister.__init__)
(SaxEventLister.startElementNS, sax_eventlist): Add support to
normalize IDs.
* test/test_xmlsupport.py
(TestEventList.test_even_list_id_normalization): New test case for
id normalization
* test/test_load.py (LoadSessionTest.check_format): Use ID
normalization
(LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
class atrributes used for ID normalization
(TestSingleLayer, TestLayerVisibility, TestLabels.test)
(TestLayerProjection.test, TestRasterLayer.test): Adapt to new
file format
(TestJoinedTable): New test for loading sessions with joined
tables.
(TestLoadError): New. Test whether missing required attributes
cause a LoadError.
* test/test_save.py (SaveSessionTest.thubanids)
(SaveSessionTest.thubanidrefs): New class attributes for ID
normalization in .thuban files.
(SaveSessionTest.compare_xml): Use id-normalization.
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer): Adapt to new file format.
(SaveSessionTest.testLayerProjection): The filename used was the
same as for testSingleLayer. Use a different one.
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table): New test cases for saving the
new data sources structures.
(TestStoreSort, MockDataStore): Classes to test the sorting of the
data stores for writing.
Revision
1257 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 12:22:25 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_xmlsupport.py
File length: 2942 byte(s)
Diff to
previous 1245
* test/test_load.py (LoadSessionTest.check_format): New helper
method to make sure the test files we load might have been written
by the current thuban version.
(ClassificationTest.TestLayers, TestSingleLayer.test)
(TestLayerVisibility.test, TestClassification.test)
(TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
Add check_format() calls and fix the thuban data to match the data
that would be written by saving the session loaded from it.
* test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
the same class and function in test_save.
* test/test_xmlsupport.py (TestEventList): New. test cases for
sax_eventlist
Revision
1245 -
(
view)
(
annotate)
-
[select for diffs]
Added
Thu Jun 19 19:29:23 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_xmlsupport.py
File length: 1450 byte(s)
Add XML validation to some of the tests. Validation will only be
done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
To make the DTD available to the test cases it's moved into
Resources/XML
* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
for versions up to and including 0.2. Two slight changes: added an
encoding specification and fixed the comment which refered to
GRASS, not Thuban
* test/xmlsupport.py: New support module for tests involving XML.
Currently there's a mix-in class for XML validation.
* test/test_xmlsupport.py: New. Tests for the xmlsupport module
* test/test_save.py (SaveSessionTest): Derive from ValidationTest
so that we can validate the
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer): Validate the generated XML
* test/runtests.py (main): Call print_additional_summary instead
of print_garbage_information
* test/support.py (resource_dir): New function to return the
"Resource" subdirectory
(print_additional_summary): New function to combine several
summary functions
(run_tests): Use print_additional_summary instead of calling
print_garbage_information directly
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.