Parent Directory
|
Revision Log
Links to HEAD: | (view) (annotate) |
Sticky Revision: |
* test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use the implementation in xmlsupport instead. (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport * test/test_proj.py: Import sax_eventlist from xmlsupport instead of test_save
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
(XMLWriterTest.Encode): Check return values. Fixes RTbug #1851.
(XMLWriterTest.testEncode): Explicitly check unicode strings.
(SaveSessionTest.testClassifiedLayer): New test for saving classified layers. Fixes RTbug #1902. (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
Added tests associated with the raster layer code.
SaveSessionTest.testSingleLayer): Add test for saving an invisible layer.
(SaveSessionTest.testLayerProjection): New test to verify layer projections are saved correctly.
First step towards table management. Introduce a simple data abstraction so that we replace the data a layer uses more easily in the next step. * Thuban/Model/data.py: New file with a simple data abstraction that bundles shapefile and dbffile into one object. * Thuban/Model/session.py (Session.OpenShapefile): New method to open shapefiles and return a shape store object * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store object instead of a shapefile filename. This introduces a new instance variable store holding the datastore. For intermediate backwards compatibility keep the old instance variables. (open_shapefile): Removed. No longer needed with the shape store. (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and get the shape store used by a layer. (Layer.Destroy): No need to explicitly destroy the shapefile or table anymore. * Thuban/UI/mainwindow.py (MainWindow.AddLayer) (MainWindow.AddLayer): Use the session's OpenShapefile method to open shapefiles * Thuban/Model/load.py (ProcessSession.start_layer): Use the session's OpenShapefile method to open shapefiles * test/test_classification.py (TestClassification.test_classification): Use the session's OpenShapefile method to open shapefiles and build the filename in a more platform independed way * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): Implement to have a session to use in the tests (TestLayer.test_arc_layer, TestLayer.test_polygon_layer) (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the session's OpenShapefile method to open shapefiles (TestLayerLegend.setUp): Instantiate a session so that we can use it to open shapefiles. (TestLayerLegend.tearDown): Make sure that all references to layers and session are removed otherwise we may get a resource leak * test/test_map.py (TestMapAddLayer.test_add_layer) (TestMapWithContents.setUp): Instantiate a session so that we can use it to open shapefiles. (TestMapWithContents.tearDown): Make sure that all references to layers, maps and sessions are removed otherwise we may get a resource leak ("__main__"): use support.run_tests() so that more info about uncollected garbage is printed * test/test_save.py (SaveSessionTest.testSingleLayer): Use the session's OpenShapefile method to open shapefiles ("__main__"): use support.run_tests() so that more info about uncollected garbage is printed * test/test_selection.py (TestSelection.tearDown): Make sure that all references to the session and the selection are removed otherwise we may get a resource leak (TestSelection.get_layer): Instantiate a session so that we can use it to open shapefiles. ("__main__"): use support.run_tests() so that more info about uncollected garbage is printed * test/test_session.py (TestSessionBase.tearDown) (TestSessionWithContent.tearDown): Make sure that all references to the session and layers are removed otherwise we may get a resource leak (TestSessionWithContent.setUp): Use the session's OpenShapefile method to open shapefiles
Fixed problem with xml reading that caused exceptions
Fixed external entity problem.
New and improved tests.
Initial set of tests and brief instructions on how to run them
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.
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |