Log of /branches/WIP-pyshapelib-bramz/test/test_save.py
Parent Directory
|
Revision Log
Revision
2655 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 27 21:45:38 2005 UTC
(19 years, 7 months ago)
by
jan
Original Path:
trunk/thuban/test/test_save.py
File length: 25730 byte(s)
Diff to
previous 2642
,
to
selected 2059
(SaveSessionTest.testSingleLayer, SaveSessionTest.testLayerProjection,
SaveSessionTest.testClassifiedLayer, SaveSessionTest.test_joined_table,
SaveSessionTest.test_save_postgis): Removed attributes from layer
element to classification clnull element.
(test_save_postgis.NonConnectionStore._fetch_table_information): added
pretending to have a shape_type.
Revision
2642 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 1 20:49:04 2005 UTC
(19 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 24916 byte(s)
Diff to
previous 2621
,
to
selected 2059
First step towards unicode. With this roughly we're at step 1
string_representation.txt
* Doc/technotes/string_representation.txt: New. Document how
strings are represented in Thuban and how to get to a Unicode
Thuban.
* Thuban/__init__.py (set_internal_encoding)
(unicode_from_internal, internal_from_unicode): New. The first few
functions for the internal string representation
* Thuban/UI/about.py (unicodeToLocale): Removed. Use
internal_from_unicode instead.
* Thuban/UI/__init__.py (install_wx_translation): Determine the
encoding to use for the internal string representation. Also,
change the translation function to return strings in internal
representation even on unicode builds of wxPython
* Thuban/Model/load.py (SessionLoader.check_attrs): Decode
filenames too.
(SessionLoader.start_clrange): Use check_attrs to decode and check
the attributes.
* Thuban/Model/xmlreader.py (XMLReader.encode): Use
internal_from_unicode to convert unicode strings.
* Thuban/Model/xmlwriter.py (XMLWriter.encode): Use
unicode_from_internal when applicable
* test/runtests.py (main): New command line option:
internal-encoding to specify the internal string encoding to use
in the tests.
* test/support.py (initthuban): Set the internal encoding to
latin-1
* test/test_load.py (TestSingleLayer.test, TestClassification.test)
(TestLabelLayer.test): Use the internal string representation when
dealing with non-ascii characters
* test/test_load_1_0.py (TestSingleLayer.test)
(TestClassification.test, TestLabelLayer.test): Use the internal
string representation when dealing with non-ascii characters
* test/test_load_0_9.py (TestSingleLayer.test)
(TestClassification.test): Use the internal string representation
when dealing with non-ascii characters
* test/test_load_0_8.py (TestUnicodeStrings.test): Use the
internal string representation when dealing with non-ascii
characters
* test/test_save.py (XMLWriterTest.testEncode)
(SaveSessionTest.testClassifiedLayer): Use the internal string
representation when dealing with non-ascii characters where
applicable
Revision
2104 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 12 12:19:15 2004 UTC
(20 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 24077 byte(s)
Diff to
previous 2059
Final step for explicit id/geometry columns: Loading and saving
* Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
with the following changes:
(dbshapesource): Two new attributes id_column and geometry_column
* Thuban/Model/save.py (SessionSaver.write): Use the new dtd
(SessionSaver.write_session): Use the new namespace
(SessionSaver.write_data_containers): Write the new dbshapesource
parameters
* Thuban/Model/load.py (SessionLoader.__init__): New namespace for
the new file format version
(SessionLoader.start_dbshapesource): Handle the new db parameters
* test/test_save.py: Update to the new dtd and namespace
(SaveSessionTest.test_save_postgis): Update the NonConnectionStore
mock object to provide a working IDColumn method.
* test/test_load_1_0.py: New. Copy of the test_load.py before
today's changes but with the round-trip tests removed.
* test/test_load_0_9.py: Update doc-string.
* test/test_load.py: Update all .thuban files to the new dtd and
namespace.
(TestPostGISLayer.file_contents): Add the new dbshapesource
paramters
Revision
2059 -
(
view)
(
annotate)
-
[selected]
Modified
Wed Feb 11 09:05:40 2004 UTC
(21 years ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23778 byte(s)
Diff to
previous 2036
* Thuban/Model/postgisdb.py
(PostGISTable._fetch_table_information): Delegate the creation of
column objects to a different method so that we can extend that in
derived classes
(PostGISTable._create_col_from_description): New. Column object
creation part of _fetch_table_information
(PostGISShapeStore._create_col_from_description): New. Extend
inherited method to handle geometry columns
(PostGISShapeStore.__init__): New parameter geometry_column to
specify which geometry column to use. Optional but mandatory for
tables with more than one geometry column
(PostGISShapeStore._fetch_table_information): Also use the name of
the geometry column when looking for the srid
(PostGISShapeStore.ShapeType): Also use the name of the geometry
column when looking for the shape type
* test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
NonConnectionStore to changes in the PostGISShapeStore
* test/test_postgis_db.py
(TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
PostGISShapeStore with tables having two geometry columns.
Revision
2036 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 22 17:49:43 2003 UTC
(21 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23682 byte(s)
Diff to
previous 2004
,
to
selected 2059
* setup.py (setup call): 1.0.0, yeah!
* Thuban/version.py (longversion): 1.0.0, yeah!
* Thuban/Model/load.py (SessionLoader.__init__): Accept the
1.0.0 namespace too
* Thuban/Model/save.py (SessionSaver.write_session): Save with
1.0.0 namespace
* test/test_load.py (LoadSessionTest.dtd)
(TestSingleLayer.file_contents)
(TestNonAsciiColumnName.file_contents)
(TestLayerVisibility.file_contents)
(TestClassification.file_contents, TestLabels.file_contents)
(TestLayerProjection.file_contents)
(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
(TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
(TestPostGISLayerPassword.file_contents)
(TestLoadError.file_contents, TestLoadError.test): Update for
1.0.0 namespace
* test/test_save.py (SaveSessionTest.dtd)
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table)
(SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
Revision
2004 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 2 13:25:55 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23691 byte(s)
Diff to
previous 1989
,
to
selected 2059
* Thuban/Model/save.py (SessionSaver.write_session): Save files
with the thuban-1.0rc1
* Thuban/Model/load.py (SessionLoader.__init__): Recognize the
thuban-1.0rc1 namespace too
* test/test_save.py (SaveSessionTest.dtd)
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table)
(SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
namespace
* test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
namespace
(TestSingleLayer.file_contents)
(TestNonAsciiColumnName.file_contents)
(TestLayerVisibility.file_contents)
(TestClassification.file_contents, TestLabels.file_contents)
(TestLayerProjection.file_contents)
(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
(TestPostGISLayer.file_contents)
(TestPostGISLayerPassword.file_contents)
(TestLoadError.file_contents, TestLoadError.test): Update to
thuban-1.0rc1 namespace
Revision
1989 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 28 12:00:54 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23700 byte(s)
Diff to
previous 1845
,
to
selected 2059
Unify the filenames stored in .thuban files so that the .thuban
files are more platform independend
* Thuban/Model/save.py (unify_filename): New. Unify filenames so
that they can be used on both windows and unix
(SessionSaver.prepare_filename): New. Handle all filename
transformations for filenames stored in the thuban file
(SessionSaver.write_data_containers, SessionSaver.write_layer):
Use prepare_filename
* test/test_save.py (SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table): Filenames are always stored
with slashes on all currently supported platforms so adapt all
tests to this
* test/test_load.py (LoadSessionTest.filenames): With the new
filename scheme the filenames in the tests should be
understandable on all currently supported platforms so we turn
this into an empty list because we don't have to normalize them
anymore
Revision
1845 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 21 10:49:50 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 24293 byte(s)
Diff to
previous 1687
,
to
selected 2059
(SaveSessionTest.dtd)
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table)
(SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
(SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
use a and epsg projection to test saving them
Revision
1687 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 29 10:02:16 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23977 byte(s)
Diff to
previous 1678
,
to
selected 2059
Add some missing parameters to projections. Proj complains about
them on windows but for some reason not on Linux.
* test/test_save.py (SaveSessionTest.testLayerProjection): Add
missing required projection parameters
* test/test_proj.py (TestProjFile.test): Add missing required
projection parameters
* test/test_load_0_8.py (TestLayerProjection.file_contents)
(TestLayerProjection.test): Add missing required projection
parameters and tests for them
* test/test_load.py (TestLayerProjection.file_contents)
(TestLayerProjection.test): Add missing required projection
parameters and tests for them
* test/test_layer.py (TestLayer.test_base_layer): Add missing
required projection parameters
Revision
1664 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 27 15:20:54 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23498 byte(s)
Diff to
previous 1640
,
to
selected 2059
As preparation for the 0.9 release, switch thuban files to a
non-dev namespace
* Thuban/Model/save.py (SessionSaver.write_session): Write files
with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
namespace
* Thuban/Model/load.py (SessionLoader.__init__): Accept the
http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
* test/test_save.py (SaveSessionTest.dtd)
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table)
(SaveSessionTest.test_save_postgis): Update for new namespace
* test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
(TestLayerVisibility.file_contents, TestLabels.file_contents)
(TestLayerProjection.file_contents)
(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
(TestPostGISLayer.file_contents)
(TestPostGISLayerPassword.file_contents)
(TestLoadError.file_contents, TestLoadError.test): Update for new
namespace
Revision
1638 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 22 18:19:14 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 23440 byte(s)
Diff to
previous 1599
,
to
selected 2059
Implement saving a session with a postgis connection
* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
elements for database connections and shapestores using db
connections
(session): Add the dbconnections to the content model
* Thuban/Model/save.py (SessionSaver.write_db_connections): New.
Write the db connections
(SessionSaver.write_session): Call write_db_connections to write
the connection before the data sources
(SessionSaver.write_data_containers): Handle postgis shapestores
* test/test_save.py (SaveSessionTest.thubanids)
(SaveSessionTest.thubanidrefs): Update for new DTD
(SaveSessionTest.test_save_postgis): New. Test saving a session
with postgis connections
* Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
(PostGISTable.TableName): New accessor methods for the connection
and table name
* test/test_postgis_db.py (TestPostGISTable.test_dbconn)
(TestPostGISTable.test_dbname): New methods to test the new
PostGISConnection methods
Revision
1599 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 18 12:45:28 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 21244 byte(s)
Diff to
previous 1452
,
to
selected 2059
Fix some bugs in Thuban and the test suite that were uncovered by
changes introduced in Python 2.3:
* Thuban/Model/table.py (DBFTable.__init__): Make sure the
filename is an absolute name
* Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
filename is an absolute name
* test/test_save.py (SaveSessionTest.testRasterLayer): Use a
unique filename to save to and use the correct relative filename
in the expected output.
(SaveSessionTest.test_dbf_table): Use the correct relative
filename in the expected output.
* test/test_layer.py (TestLayer.test_raster_layer): Update the
test to check whether the filename is absolute.
Revision
1452 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 18 12:57:59 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 21159 byte(s)
Diff to
previous 1439
,
to
selected 2059
* Thuban/Model/layer.py (Layer.__init__): Rename
classificationField to classificatin_column and init it here so
that it can be used in SetClassificationColumn
(Layer.GetClassificationColumn, Layer.GetClassificationField):
Rename to GetClassificationColumn.
(Layer.SetClassificationColumn, Layer.SetClassificationField):
Rename to SetClassificationColumn and issue a LAYER_CHANGED
message if the column changes.
(Layer._classification_changed, Layer.ClassChanged): Rename to
_classification_changed. Update the callers.
(Layer.SetShapeStore): Further field->column renames.
* Thuban/Model/load.py (SessionLoader.start_classification)
(SessionLoader.start_clpoint): Updates because of
field->column method name changes in the Layer class
* Thuban/Model/save.py (SessionSaver.write_classification): Updates
because of field->column method name changes in the Layer class
* Thuban/UI/classifier.py (Classifier.__init__)
(Classifier._OnTry, Classifier._OnRevert): Updates because of
field->column method name changes in the Layer class
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
because of field->column method name changes in the Layer class
* Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
of field->column method name changes in the Layer class
* test/test_save.py (SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.testClassifiedLayer): Update because of
field->column method name changes in the Layer class
* test/test_layer.py (SetShapeStoreTests.setUp)
(SetShapeStoreTests.test_sanity): Update because of field->column
method name changes in the Layer class
(TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
(TestLayerModification.test_sanity)
(TestLayerModification.test_initial_settings): remove unsued code
and rename to test_sanity.
(TestLayerModification.test_set_classification): New test for
SetClassification and SetClassificationField.
Revision
1417 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 15 08:43:53 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 21148 byte(s)
Diff to
previous 1375
,
to
selected 2059
* Thuban/Model/save.py (SessionSaver.write_classification): Encode
string values (in addition to the labels) as UTF 8
* Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
values if the field type is string
* test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
saving a session with non-ascii string classification values.
* test/test_load.py (TestClassification.file_contents)
(TestClassification.test): Check for non-ascii values in string
classifications
Revision
1375 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 8 10:53:05 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 20143 byte(s)
Diff to
previous 1357
,
to
selected 2059
* Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
0.9.
* Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
New. Return the join type
* Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
DTD
(SessionSaver.write_data_containers): Save the join type for
joined tables
* Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
namespace
(SessionLoader.start_jointable): Handle the jointype attribute
* test/test_load_0_8.py: New. Effectively a copy of test_load.py
as of Thuban 0.8. These are now tests to determine whether Thuban
can still read files generated by Thuban 0.8
* test/test_load.py (LoadSessionTest.dtd)
(TestSingleLayer.file_contents)
(TestLayerVisibility.file_contents, TestLabels.file_contents)
(TestLayerProjection.file_contents)
(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
(TestJoinedTable.file_contents)
(TestLoadError.file_contents): Update for new DTD
(TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
for new join type attribute
* test/test_save.py (SaveSessionTest.dtd)
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table): Update for new DTD
(SaveSessionTest.test_joined_table): Add test for new join type
attribute
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_save.py
File length: 20232 byte(s)
Diff to
previous 1259
,
to
selected 2059
* 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
1259 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 12:31:48 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 12197 byte(s)
Diff to
previous 1245
,
to
selected 2059
* 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
Revision
1245 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 19 19:29:23 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 13268 byte(s)
Diff to
previous 1200
,
to
selected 2059
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
Revision
723 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 24 15:31:53 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test/test_save.py
File length: 4439 byte(s)
Diff to
previous 530
,
to
selected 2059
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
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.