Log of /branches/WIP-pyshapelib-bramz/test/test_load.py
Parent Directory
|
Revision Log
Revision
2654 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 27 21:44:16 2005 UTC
(19 years, 7 months ago)
by
jan
Original Path:
trunk/thuban/test/test_load.py
File length: 43775 byte(s)
Diff to
previous 2642
,
to
selected 2034
(TestSingleLayer, TestNonAsciiColumnName, TestLayerVisibility,
TestSymbolSize, TestClassification, TestLabels, TestLayerProjection,
TestJoinedTable, TestLabelLayer): Removed attributes from layer
element to classification clnull element.
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_load.py
File length: 43311 byte(s)
Diff to
previous 2620
,
to
selected 2034
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
2451 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 13 17:51:11 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 42367 byte(s)
Diff to
previous 2446
,
to
selected 2034
* test/test_load.py (TestAltPath.test_01_single_path_error_fix)
(TestAltPath.test_02_path_error_fix_from_list)
(TestAltPath.test_05_path_error_fix_from_list_changed)
(TestAltPath.test_06_path_error_fix_from_list_fails): self.session
is destroyed in tearDown, so there's no need to do it in a test
case.
* Thuban/Model/load.py (SessionLoader.open_shapefile): Remove a
debug print
Revision
2446 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 13 11:52:34 2004 UTC
(20 years, 2 months ago)
by
frank
Original Path:
trunk/thuban/test/test_load.py
File length: 42603 byte(s)
Diff to
previous 2373
,
to
selected 2034
Alternative Path feature:
* test/test_load.py (TestAltPath): New, tests for alternative path feature
in load_session()
(Shapefile_CallBack): Helper, implements controllable callback.
* Thuban/UI/application.py (ThubanApplication.OnInit):
Added "alt_path" to self.path
(ThubanApplication.OpenSession): Added shapefile_callback as second
callback similar to db_connection_callback.
(ThubanApplication.run_alt_path_dialog): New, implementaion of
shapefile_callback. In addition to raising the dialog the control of
self.path('alt_path') is implemented here.
* Thuban/Model/load.py (SessionLoader.__init__): Added shapefile_callback.
(SessionLoader.open_shapefile): Open shapefile, eventually with
alternative path. This wrapps the "theSession.OpenShapefile(filename)"
formerly used in start_fileshapesource()/start_layer().
(SessionLoader.start_fileshapesource): Call open_shapefile().
(SessionLoader.start_layer): Call open_shapefile().
(load_session): Added shapefile_callback.
* Thuban/UI/altpathdialog.py: New, implements dialogs for alternative path
feature (search / check).
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_load.py
File length: 35641 byte(s)
Diff to
previous 2036
,
to
selected 2034
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
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_load.py
File length: 35527 byte(s)
Diff to
previous 2034
* 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
2034 -
(
view)
(
annotate)
-
[selected]
Modified
Mon Dec 22 16:35:16 2003 UTC
(21 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 35541 byte(s)
Diff to
previous 2004
* Thuban/Model/load.py (SessionLoader.start_label): Make sure the
alignment flags are byte strings not unicode and that they have
valid values
* test/test_load.py (TestLabelLayer): New. Test loading (and
indirectly saving) of maps with labels.
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_load.py
File length: 32905 byte(s)
Diff to
previous 1989
,
to
selected 2034
* 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_load.py
File length: 32918 byte(s)
Diff to
previous 1976
,
to
selected 2034
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
1970 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 24 18:36:00 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 32559 byte(s)
Diff to
previous 1931
,
to
selected 2034
* Thuban/Model/load.py (SessionLoader.check_attrs): If no
converter is specified for an attribute assume it's a string
containing only Latin1 characters. Update doc-string accordingly.
This change should fix many places where unicode objects might
accidentally enter Thuban.
* test/test_load.py (TestNonAsciiColumnName): New test to check
what happens with column names in DBF files that contain non-ascii
characters
Revision
1848 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 21 11:06:56 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 28269 byte(s)
Diff to
previous 1846
,
to
selected 2034
* test/test_load.py (TestSingleLayer.file_contents)
(TestSingleLayer.test): Add non-ascii characters to the titles of
session, map and layer. This is effectively a port of the
TestUnicodeStrings test in test_load_0_8.py which for some reason
was only added there.
* test/test_load_0_9.py (TestSingleLayer.file_contents)
(TestSingleLayer.test): Same as in test_load.py: add non-ascii
characters to the titles of session, map and layer,.
Revision
1846 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 21 10:49:53 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 28235 byte(s)
Diff to
previous 1687
,
to
selected 2034
(LoadSessionTest.dtd): Update to 1.0-dev
namespace
(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 to use
1.0-dev namespace
(TestSingleLayer.file_contents, TestSingleLayer.test): Update to
use 1.0-dev namespace and use an EPSG projection to test whether
loading it works
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_load.py
File length: 27647 byte(s)
Diff to
previous 1683
,
to
selected 2034
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
1683 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 28 15:20:57 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 27465 byte(s)
Diff to
previous 1664
,
to
selected 2034
* test/test_load.py (LoadSessionTest.filenames): New class
variable with the filename attributes to normalize
(LoadSessionTest.check_format): Pass self.filenames to
sax_eventlist to normalize the filename attributes
* test/xmlsupport.py: Add cvs keywords
(SaxEventLister.__init__): New parameter filenames which indicates
attributes that contain filenames
(SaxEventLister.startElementNS): Normalize the filename attributes
with os.path.normpath
(sax_eventlist): New parameter filenames to pass through to
SaxEventLister
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_load.py
File length: 27154 byte(s)
Diff to
previous 1646
,
to
selected 2034
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
1646 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 25 13:43:56 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 27198 byte(s)
Diff to
previous 1642
,
to
selected 2034
Basic loading of sessions containing postgis connections:
* Thuban/Model/load.py (LoadError): Add doc-string
(LoadCancelled): New exception class to indicate a cancelled load
(SessionLoader.__init__): Add the db_connection_callback parameter
which will be used by the loader to get updated parameters and a
password for a database connection
(SessionLoader.__init__): Add the new XML elements to the
dispatchers dictionary
(SessionLoader.check_attrs): Two new conversions, ascii to convert
to a byte-string object and idref as a generic id reference
(SessionLoader.start_dbconnection)
(SessionLoader.start_dbshapesource): New. Handlers for the new XML
elements
(load_session): Add the db_connection_callback to pass through the
SessionLoader
* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
New classes to test loading of sessions with postgis database
connections.
Revision
1642 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 25 10:54:31 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 21287 byte(s)
Diff to
previous 1417
,
to
selected 2034
* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
LoadError when a required attribute is missing. The code used to
be commented out for some reason, but probably should have been
active.
* test/test_load.py (TestLoadError.test): Test the message in the
LoadError too to make sure it really is about the missing
attribute
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_load.py
File length: 20965 byte(s)
Diff to
previous 1375
,
to
selected 2034
* 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_load.py
File length: 20626 byte(s)
Diff to
previous 1357
,
to
selected 2034
* 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
1282 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 23 09:47:18 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 20491 byte(s)
Diff to
previous 1268
,
to
selected 2034
Bug fix for RT #1961:
* Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
Register DerivedShapestores with the session
* Thuban/Model/session.py (Session.Tables): Make sure each table
is only listed once.
* test/test_load.py (TestJoinedTable.test): Add check_format call.
Update file contents to match the one written out.
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_load.py
File length: 20507 byte(s)
Diff to
previous 1257
,
to
selected 2034
* 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_load.py
File length: 15695 byte(s)
Diff to
previous 1247
,
to
selected 2034
* 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
1247 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 19 19:53:36 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 14629 byte(s)
Diff to
previous 1219
,
to
selected 2034
Move version specific load tests to their own file.
* test/test_load.py: Expand the doc-string to explain a bit how to
handle file format changes.
(TestClassification.test): Update the docstring as this test is
not about Thuban 0.2 anymore.
* test/test_load_0_2.py: New file with the load tests for thuban
files created with Thuban 0.2 and earlier.
Revision
1219 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 16 17:42:54 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 14174 byte(s)
Diff to
previous 957
,
to
selected 2034
Update to the layer interface: Direct access to the table,
shapetable, shapefile and filename attributes is now actively
deprecated by issuing deprecation warnings for all places where
this happens.
* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
to the instance variables table, shapetable, shapefile and
filename via __getattr__ so that we can issue a deprecation
warning.
(Layer.SetShapeStore): Don't set the deprecated instance variables
any more
(Layer.SetShapeStore): Don't use deprecated layer instance
variables
(Layer.Destroy): No need to explicitly remove the instance
variables any more
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
instance variables
* Thuban/UI/classgen.py (ClassGenDialog.__init__)
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
use deprecated layer instance variables
* Thuban/UI/classifier.py (Classifier.__init__): Don't use
deprecated layer instance variables
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
instance variables
* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
deprecated layer instance variables
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
deprecated layer instance variables
* Thuban/Model/save.py (SessionSaver.write_layer): Don't use
deprecated layer instance variables
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
(MapRenderer.polygon_render_param): Don't use deprecated layer instance
variables
* test/runtests.py (main): Turn Thuban's deprecation warnings into
errors so that they're cought by the tests
* test/test_load.py (TestSingleLayer.test): Don't use deprecated
layer instance variables
Revision
957 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Wed May 21 17:12:22 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 14159 byte(s)
Diff to
previous 947
,
to
selected 2034
Remove unused imports and restructure the
test code
(LoadSessionTest): Split into one class for each test and turn
LoadSessionTest itself into the base class for all such session
tests.
(ClassificationTest): New base class for load tests that test
classifications
(TestSingleLayer, TestLayerVisibility, TestClassification)
(TestLabels, TestLayerProjection, TestRasterLayer): New classes
for the individual tests
Revision
765 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 29 12:42:14 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test/test_load.py
File length: 12390 byte(s)
Diff to
previous 746
,
to
selected 2034
Next step of table implementation. Introduce a transient database
using SQLite that some of the data is copied to on demand. This
allows us to do joins and other operations that require an index
for good performance with reasonable efficiency. Thuban now needs
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
haven't tested that.
* Thuban/Model/transientdb.py: New. Transient database
implementation.
* test/test_transientdb.py: New. Tests for the transient DB
classes.
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
classes to help automatically remove temporary files and
directories.
(Session.__init__): New instance variables temp_dir for the
temporary directory and transient_db for the SQLite database
(Session.temp_directory): New. Create a temporary directory if not
yet done and return its name. Use AutoRemoveDir to have it
automatically deleted
(Session.TransientDB): Instantiate the transient database if not
done yet and return it.
* Thuban/Model/data.py (ShapefileStore.__init__): Use an
AutoTransientTable so that data is copied to the transient DB on
demand.
(SimpleStore): New class that simply combines a table and a
shapefile
* Thuban/Model/table.py (Table, DBFTable): Rename Table into
DBFTable and update its doc-string to reflect the fact that this
is only the table interface to a DBF file. Table is now an alias
for DBFTable for temporary backwards compatibility.
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
the last reference to the session goes away so that the temporary
files are removed properly.
* test/test_load.py (LoadSessionTest.tearDown): Remove the
reference to the session to make sure the temporary files are
removed.
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.