Log of /branches/WIP-pyshapelib-bramz/test
Directory Listing
Revision
2734 -
Directory Listing
Modified
Thu Mar 1 12:42:59 2007 UTC
(18 years ago)
by
bramz
made a copy
Revision
2723 -
Directory Listing
Modified
Tue Feb 20 10:22:54 2007 UTC
(18 years ago)
by
bernhard
Original Path:
trunk/thuban/test
* test/README: Added example how to set the PATH for postgis on Debian Etch.
Revision
2717 -
Directory Listing
Modified
Mon Jan 1 21:44:05 2007 UTC
(18 years, 2 months ago)
by
bernhard
Original Path:
trunk/thuban/test
Adding an explicit WITH OIDS to the create table commands. This fixes tests
that rely on an oid column to be present for postgresql >=8.0.
Revision
2714 -
Directory Listing
Modified
Mon Nov 6 10:09:14 2006 UTC
(18 years, 4 months ago)
by
bernhard
Original Path:
trunk/thuban/test
Fixing the possibility to run postgis tests on Debian Etch (80%).
* test/postgissupport.py: Taking pg_ctl and initdb commands
from internal variables now. Adding deactivated example values
for Debian Etch.
find_postgis_sql(): Added special line for Debian Etch postgresql-8.1.
Added copyright year 2006.
Revision
2712 -
Directory Listing
Modified
Sun Oct 15 23:27:05 2006 UTC
(18 years, 4 months ago)
by
bernhard
Original Path:
trunk/thuban/test
* Thuban/UI/renderer.py: Added module variable verbose and
added verbose output before doing a raster projection.
Minor: Added (c) year 2006.
* test/test_baserenderer.py: Added new function
test_projected_raster_decimalcommalocale()
Added new author Bernhard Reiter and new copyright year 2006.
* libraries/thuban/gdalwarp.cpp(ProjectRasterFile): Adding
switching to LC_NUMERIC "C" and back before calling GDAL functions -
only #if python >=2.4 .
Revision
2705 -
Directory Listing
Modified
Sun Sep 24 18:55:30 2006 UTC
(18 years, 5 months ago)
by
bernhard
Original Path:
trunk/thuban/test
* test/runtests.py: Added new option ---setdecimalcommalocale
to run all tests with an LC_NUMERIC that uses comma as decimal_point.
Minor: Added (c) year 2006. Fixed typo in a docstring.
* test/test_transientdb.py: Minor: Added (c) year 2006. Fixed typo in
a docstring.
Revision
2698 -
Directory Listing
Modified
Mon Sep 18 00:56:26 2006 UTC
(18 years, 5 months ago)
by
bernhard
Original Path:
trunk/thuban/test
Fixed behaviour with the proj bug and python >=2.4
when decimal_point != '.'. So de_DE locales will work fine again.
Revision
2696 -
Directory Listing
Modified
Sun Sep 17 23:19:21 2006 UTC
(18 years, 5 months ago)
by
bernhard
Original Path:
trunk/thuban/test
test/test_proj.py: new test_lc_numeric_robustness()
Revision
2693 -
Directory Listing
Modified
Fri Sep 15 08:49:51 2006 UTC
(18 years, 5 months ago)
by
bernhard
Original Path:
trunk/thuban/test
Adding localessupport.py, support code for setting locales.
Revision
2688 -
Directory Listing
Modified
Fri Jun 30 12:27:20 2006 UTC
(18 years, 8 months ago)
by
frank
Original Path:
trunk/thuban/test
New Classification "Pattern": Classify text attributes by regexp.
Revision
2673 -
Directory Listing
Modified
Wed Oct 19 08:08:29 2005 UTC
(19 years, 4 months ago)
by
bernhard
Original Path:
trunk/thuban/test
Preserving the internal encoding for the tests.
This hopefully fixes subsequent tests when runnin all via runtests.py.
Revision
2672 -
Directory Listing
Modified
Mon Oct 17 21:31:43 2005 UTC
(19 years, 4 months ago)
by
bernhard
Original Path:
trunk/thuban/test
* Thuban/__init__.py (set_internal_encoding): added a forwards
and backward translation, so that we fail early if the
internal_encoding is bad.
* test/test_stringrepresentation.py: New file, for now testing
that set_internal_coding() is throwing an exception for bad exceptions.
Revision
2655 -
Directory Listing
Modified
Wed Jul 27 21:45:38 2005 UTC
(19 years, 7 months ago)
by
jan
Original Path:
trunk/thuban/test
(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
2654 -
Directory Listing
Modified
Wed Jul 27 21:44:16 2005 UTC
(19 years, 7 months ago)
by
jan
Original Path:
trunk/thuban/test
(TestSingleLayer, TestNonAsciiColumnName, TestLayerVisibility,
TestSymbolSize, TestClassification, TestLabels, TestLayerProjection,
TestJoinedTable, TestLabelLayer): Removed attributes from layer
element to classification clnull element.
Revision
2644 -
Directory Listing
Modified
Tue Jul 5 16:30:51 2005 UTC
(19 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/layer.py (Layer.__mangle_bounding_box)
(Layer.ClipBoundingBox): Rename ClipBoundingBox to
__mangle_bounding_box. See the comments in the code and RT #2845
* test/test_layer.py (TestLayer.test_arc_layer_with_projection):
Remove the explicit test of ClipBoundingBox. The method isn't
public anymore and the direct call in the test wasn't necessary in
the first place. If ClipBoundingBox (now __mangle_bounding_box)
isn't called, the return value of ShapesInRegion will be
different.
Revision
2642 -
Directory Listing
Modified
Fri Jul 1 20:49:04 2005 UTC
(19 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
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
2623 -
Directory Listing
Modified
Mon May 9 18:12:12 2005 UTC
(19 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (PostGISConnection.connect): Set the
connection to autoconnect. Fixes RT#3148.
* test/test_postgis_db.py
(TestPostGISSpecialCases.test_simple_error_handling): New test
that attempts to reproduce RT#3148.
Revision
2621 -
Directory Listing
Modified
Fri May 6 14:19:40 2005 UTC
(19 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SaveSessionTest.testRasterLayer): Restructure test to cover a variety of
combinations of masktype and opacity settings.
Revision
2620 -
Directory Listing
Modified
Fri May 6 14:19:23 2005 UTC
(19 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestRasterLayer): Change file_contents to include opacity and masktype
variables.
(TestRasterLayer.test): Include tests for opacity and masktype changes.
Revision
2619 -
Directory Listing
Modified
Fri May 6 14:19:03 2005 UTC
(19 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SimpleRenderer.draw_raster_data): Fixed signature to match that in
BaseRenderer.
Revision
2589 -
Directory Listing
Modified
Tue Mar 29 18:36:53 2005 UTC
(19 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
(find_postgis_sql): Added yet another
potential location for (lw)postgis.sql because the file has moved
again in postgis 1.0.0 rc4.
Revision
2587 -
Directory Listing
Modified
Wed Mar 23 15:30:27 2005 UTC
(19 years, 11 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Add support for adjusting the opacity of a raster layer.
Revision
2586 -
Directory Listing
Modified
Wed Mar 16 14:55:21 2005 UTC
(19 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
(DeletionTestMixin.check_deletions)
(DeletionTestMixin.check_deletetions): renamed to check_deletions.
update the callers.
Revision
2575 -
Directory Listing
Modified
Tue Feb 22 11:09:32 2005 UTC
(20 years ago)
by
jan
Original Path:
trunk/thuban/test
(TestMapWithContents.test_tree_info): Added label layer for comparison.
Revision
2571 -
Directory Listing
Modified
Fri Feb 18 14:54:17 2005 UTC
(20 years ago)
by
jonathan
Original Path:
trunk/thuban/test
Refactored baserenderer.py and renderer.py to remove baserenderer.py's
dependencies on wxPython. Added a new method projected_raster_layer()
that returns a raster layer image in projected space. This must be
implemented in classes derived from BaseRenderer. This also eliminates
the dependency on gdal in baserenderer.py.
Revision
2562 -
Directory Listing
Modified
Wed Feb 16 21:14:47 2005 UTC
(20 years ago)
by
jonathan
Original Path:
trunk/thuban/test
Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
so that that wxproj doesn't crash. Added GUI support for selecting
alpha channel (opacity can't be selected yet).
Revision
2552 -
Directory Listing
Modified
Fri Jan 28 15:54:00 2005 UTC
(20 years, 1 month ago)
by
jonathan
Original Path:
trunk/thuban/test
Make layer's use_mask flag default to true. Support a bit array describing
the mask to use. Improve error handling in ProjectRasterFile (also addresses
RT #2947).
Revision
2551 -
Directory Listing
Modified
Thu Jan 27 14:19:41 2005 UTC
(20 years, 1 month ago)
by
jonathan
Original Path:
trunk/thuban/test
Add a new dialog box for raster layers. The dialog box allows
the user to toggle a mask that is generated by ProjectRasterFile
and is used to only draw the real parts of the projected image.
Revision
2543 -
Directory Listing
Modified
Fri Jan 21 16:58:31 2005 UTC
(20 years, 1 month ago)
by
bh
Original Path:
trunk/thuban/test
(PostGISDatabase.__init__): Tweak
doc-string
(find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a
different name for the initialization SQL file.
Revision
2537 -
Directory Listing
Modified
Fri Jan 21 14:01:25 2005 UTC
(20 years, 1 month ago)
by
jonathan
Original Path:
trunk/thuban/test
Improved rendering raster layers by changing the return format of
the ProjectRasterFile function.
Revision
2472 -
Directory Listing
Modified
Thu Dec 16 15:18:57 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
Add support for PostGIS tables with LINESTRING geomentries.
Fixes RT#2299
* Thuban/Model/postgisdb.py (shapetype_map): Add LINESTRING
* test/postgissupport.py
(PostgreSQLServer.get_default_static_data_db): Rename the "roads"
table to "roads-multi" because it now uses MULTILINESTRING
geometries and introduce a new "roads" table that uses LINESTRING
(coords_to_multilinestring): Make the doc string more precise
(coords_to_linestring): New. Create a LINESTRING WKT
representatin
(wkt_converter): Add coords_to_linestring
(upload_shapefile): Rephrase the doc-string a bit.
* test/test_postgis_db.py (TestPostGISShapestoreArc)
(LineStringTests)
(TestPostGISShapestoreLineString)
(TestPostGISShapestoreMultiLineString): Split
TestPostGISShapestoreArc into a base class LineStringTests and two
derived classes TestPostGISShapestoreLineString for LINESTRING
geometries and TestPostGISShapestoreMultiLineString for
MULTILINESTRING geometries. Most test methods are in the base
class with the exception of tests that explicitly check the raw
format.
Revision
2471 -
Directory Listing
Modified
Thu Dec 16 14:19:21 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
Make the test suite work with PostGIS 0.8.2 and PostgreSQL 7.4
* test/postgissupport.py (find_postgis_sql): Different postgis
versions put the postgis.sql file into slightly different places
so we have to look in both. The updated doc string describes this
is more detail.
* test/test_postgis_db.py
(TestPostGISSpecialCases.test_column_name_quoting): The return
value of UniqueValues is unsorted, so it has to be sorted for
comparison.
Revision
2460 -
Directory Listing
Modified
Wed Dec 15 14:01:04 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
(PostgreSQLServer.execute_sql): Extend to
so that it returns a result for select statements.
(PostgreSQLServer.server_version): New. Return the version of the
server software.
(PostgreSQLServer.require_authentication): The format of
pg_hba.conf has changed between PostgrSQL 7.2 and 7.3. Check the
server version and generate the file in the correct format
Revision
2459 -
Directory Listing
Modified
Wed Dec 15 11:12:11 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
(PostgreSQLServer.is_running): Fix typo
in the doc string and rephrase it a little.
Revision
2458 -
Directory Listing
Modified
Wed Dec 15 09:58:30 2004 UTC
(20 years, 2 months ago)
by
frank
Original Path:
trunk/thuban/test
(TestAltPath.test_01_single_path_error_fix): Code cleanup.
Revision
2456 -
Directory Listing
Modified
Wed Dec 15 09:44:34 2004 UTC
(20 years, 2 months ago)
by
frank
Original Path:
trunk/thuban/test
(TestAltPath.checkSession): New, extended checks if session has been loaded
successfully. The check is called by the relevant tests after executing
load_session().
Revision
2451 -
Directory Listing
Modified
Mon Dec 13 17:51:11 2004 UTC
(20 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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 -
Directory Listing
Modified
Mon Dec 13 11:52:34 2004 UTC
(20 years, 2 months ago)
by
frank
Original Path:
trunk/thuban/test
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
2435 -
Directory Listing
Modified
Tue Dec 7 16:44:51 2004 UTC
(20 years, 2 months ago)
by
nhueffme
Original Path:
trunk/thuban/test
Adding a new extension to read shapefiles with ogr. It is planned to add other
vector formats.
Revision
2373 -
Directory Listing
Modified
Sun Oct 3 20:49:24 2004 UTC
(20 years, 5 months ago)
by
jan
Original Path:
trunk/thuban/test
(ClassificationTest.TestLayers): Added SetSize in case
of a corresponding argument is given.
TestSymbolSize): New. Test the size attribute of cldata.
Revision
2351 -
Directory Listing
Modified
Sat Sep 25 18:49:20 2004 UTC
(20 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.test_arc_layer_with_projection):
Remove a debug print and some tab characters.
Revision
2297 -
Directory Listing
Modified
Thu Jul 22 13:07:52 2004 UTC
(20 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
visible extent of the map in projected coordinates
* test/test_viewport.py (SimpleViewPortTest.test_default_size)
(SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
tests.
(SimpleViewPortTest.test_visible_extent): New. The real test for
VisibleExtent()
Revision
2296 -
Directory Listing
Modified
Thu Jul 22 13:05:50 2004 UTC
(20 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
Use support.run_tests as the main
function when running asa script.
Revision
2289 -
Directory Listing
Modified
Fri Jul 16 19:47:29 2004 UTC
(20 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_viewport.py
(ViewPortTest.test_changing_map_projection): Check that changing
the projection of an empty map shown in a viewport doesn't lead to
exceptions in the viewport's handler for the
MAP_PROJECTION_CHANGED messages
* Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
try to keep the same region visible when the map actually contains
something
Revision
2229 -
Directory Listing
Modified
Thu Jun 3 15:18:07 2004 UTC
(20 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayerModification.setUp): Save the
filename as an instance variable so we can refer to it in tests
(TestLayerModification.test_tree_info): Uncomment this method
again and make it work. This tests for the formatting issue
filed in RT#2239 on 2004-01-13
Revision
2205 -
Directory Listing
Modified
Wed May 12 20:50:33 2004 UTC
(20 years, 9 months ago)
by
jan
Original Path:
trunk/thuban/test
(MenuTest.test): Added testing of method Menu.FindOrInsertMenu.
Revision
2106 -
Directory Listing
Modified
Fri Mar 12 12:59:33 2004 UTC
(20 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
Support views in addition to normal tables in the postgis shapestore
* Thuban/Model/postgisdb.py
(PostGISShapeStore._fetch_table_information): Add a fallback for
the case where the table name is not in the geometry_columns
table. This is usually the case for views. Also, set
self.shapestore here.
(PostGISShapeStore.ShapeType): No need to query the database all
the time. The shape type is now determined in
_fetch_table_information
* test/postgissupport.py (PostgreSQLServer.new_postgis_db)
(PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
New parameter to specify views.
(PostGISDatabase.has_data): Also compare the views. New views
parameter
(PostGISDatabase.initdb): Create the views.
(PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
view
* test/test_postgis_db.py
(TestPostGISShapestorePointFromViews): New. Test a
PostGISShapeStore with a view
(TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
the geometry_column explicitly to test whether that works
Revision
2104 -
Directory Listing
Modified
Fri Mar 12 12:19:15 2004 UTC
(20 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
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
2102 -
Directory Listing
Modified
Thu Mar 11 21:04:30 2004 UTC
(20 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
the dialog is constructed. Add combo boxes to select id and
geometry column. Rename some instance variables.
(ChooseDBTableDialog.GetTable): Return id and geometry column
names
(ChooseDBTableDialog.OnTableSelect): New. Event handler for
selections in the table list
* Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
and geometry_column
* Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
parameters for id_column and geometry column of PostGISShapeStore
here as well.
* Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
(_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
(PostGISConnection.GeometryTables): Use a better query to
determine which relations in the database might be usable for
shapestores. Now supports views as well but is more PostgreSQL
specific
(PostGISConnection.table_columns): New. Somewhat experimental
method to let the db dialogs provide lists of columns to users so
that they can select id and geometry columns.
(PostGISTable.__init__): The default value of the id_column
parameter is now None it still means "gid" effectively, though.
(PostGISTable.IDColumn): New introspection method to return a
column object for the id column
(PostGISShapeStore.GeometryColumn): New introspection method to
return a column object for the geometry column
* test/test_postgis_db.py
(TestPostGISConnection.test_gis_tables_non_empty):
Removed. Subsumed by the new:
(TestPostGISConnection.test_gis_tables_with_views_and_tables):
New. Tes the GeometryTables and table_columns methods with actual
tables and views.
(PointTests.test_id_column, PointTests.test_geometry_column):
New. tests for the new methods.
(TestPostGISShapestorePoint.setUp)
(TestPostGISShapestorePointSRID.setUp)
(TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
instance variables needed by the new tests
Revision
2096 -
Directory Listing
Modified
Thu Mar 11 13:50:53 2004 UTC
(20 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
id_column to specify which column to use to identify rows. Also
new instance variables id_column and quoted_id_column
(PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
(PostGISTable.SimpleQuery): Use the id column name provided to the
constructor instead of "gid"
(PostGISShapeStore.__init__): New parameter id_column analogously
to PostGISTable.__init__. This parameter is simply passed through
to the base class constructor
(PostGISShapeStore._create_col_from_description): Fix typo in
doc-string
(PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
(PostGISShapeStore.ShapesInRegion): Use the id column name
provided to the constructor instead of "gid"
* test/postgissupport.py
(PostgreSQLServer.get_default_static_data_db): New static table
landmarks_point_id with an id column != "gid. Update the comments
a bit.
(skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
doc-
(upload_shapefile): New parameter gid_column to use a name other
than "gid" for the column to store the shape ids
* test/test_postgis_db.py (TableTests): New. Mixin-class
containing all tests previously in TestPostGISTable. The actual
tests are the same but the code is a bit more configurable to
allow for different id columns etc.
(TestPostGISTable): Derive from TableTests now for the actual
tests.
(TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
except that it the landmarks_point_id table to test the id_column
parameter
(PointTests): Extend the doc-string
(TestPostGISShapestorePointExplicitGIDColumn)
(TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
from PointTests to test the explicit id_column parameter. One
tests with the name of the column holding the shape ids, the other
uses PostgreSQL's OID column. For the latter a number of methods
have to be overwritten to make them independent of the actual id
values.
Revision
2079 -
Directory Listing
Modified
Fri Feb 20 14:29:13 2004 UTC
(21 years ago)
by
bh
Original Path:
trunk/thuban/test
(find_test_modules): New. Function with the
module finding code from main.
(main): Use find_test_modules to figure out the default test
modules and take modules from Extensions.svgexport.test too.
Revision
2071 -
Directory Listing
Modified
Tue Feb 17 12:54:00 2004 UTC
(21 years ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_svgmapwriter.py, Extensions/svgsaver.py,
Extensions/svgmapwriter.py, Extensions/maplegend.py,
extensions/svgexport/svgsaver.py,
extensions/svgexport/svgmapwriter.py,
extensions/svgexport/maplegend.py: Removed. These files were in
the wrong places or didn't work at all.
Revision
2065 -
Directory Listing
Modified
Sun Feb 15 15:51:17 2004 UTC
(21 years ago)
by
mrechtie
Original Path:
trunk/thuban/test
Initial revision. Tests for VirtualDC svgmapwriter module.
Revision
2059 -
Directory Listing
Modified
Wed Feb 11 09:05:40 2004 UTC
(21 years ago)
by
bh
Original Path:
trunk/thuban/test
* 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
2057 -
Directory Listing
Modified
Tue Feb 10 15:51:57 2004 UTC
(21 years ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
doc-string
(PostGISShapeStore._fetch_table_information): New. Extend
inherited method to retrieve srid
(PostGISShapeStore.BoundingBox): Handle tables without data.
extent yields NULL for those
(PostGISShapeStore.ShapesInRegion): Use the srid of the table.
* test/test_postgis_db.py
(TestPostGISSpecialCases.test_shapestore_empty_table): New test
for the special case of a table without any data
(TestPostGISShapestorePointSRID): New class with tests for a table
that uses srids
(PolygonTests): Fix a doc-string typo
* test/postgissupport.py (PostGISDatabase.__init__): New parameter
reference_systems with a specification of spacial reference
systems to create in the new db.
(PostgreSQLServer.new_postgis_db)
(PostgreSQLServer.get_static_data_db): New parameter
reference_systems to be passed through ultimately to
PostGISDatabase. In new_postgis_db also check whether an existing
db already has the right srids
(PostgreSQLServer.get_default_static_data_db): Add srids and a
table that uses srids
(PostGISDatabase.initdb): Create the entries for the reference
systems
(PostGISDatabase.has_data): Add reference_systems parameter to
check for those too
(upload_shapefile): New parameter srid to create tables with a
specific srid
Revision
2036 -
Directory Listing
Modified
Mon Dec 22 17:49:43 2003 UTC
(21 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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 -
Directory Listing
Modified
Mon Dec 22 16:35:16 2003 UTC
(21 years, 2 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
2011 -
Directory Listing
Modified
Wed Dec 3 09:46:27 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Lib/version.py: New. Module for version number
manipulations. The version of make_tuple here also deals better
with more unusual version number strings, such as e.g.
"1.2+cvs20031111"
* Thuban/version.py (make_tuple): Removed. It's now in
Thuban.Lib.version. Use that implementation instead.
* test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
Revision
2004 -
Directory Listing
Modified
Tue Dec 2 13:25:55 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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 -
Directory Listing
Modified
Fri Nov 28 12:00:54 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1987 -
Directory Listing
Modified
Fri Nov 28 11:37:35 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.test_arc_layer_with_projection):
Add the ellipsoid to the projection since some Proj versions
complain if it's missing.
Revision
1983 -
Directory Listing
Modified
Thu Nov 27 15:57:23 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/layer.py (Layer.LatLongBoundingBox)
(Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
new InverseBBox method to determine the unprojected bounding box
(Layer.ShapesInRegion): Use the ForwardBBox method to project the
bbox.
* test/test_layer.py (TestLayer.test_point_layer_with_projection):
Removed.
(TestLayer.test_arc_layer_with_projection): New. This test is
better able to test whether bounding boxes are projected correctly
than test_point_layer_with_projection
Revision
1982 -
Directory Listing
Modified
Thu Nov 27 15:25:34 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
version of ForwardBBox
(Projection._transform_bbox): New. common implementation of
ForwardBBox and InverseBBox
(Projection.ForwardBBox): Use _transform_bbox.
* test/test_proj.py (TestProjection.test): Add test for
InverseBBox
Revision
1976 -
Directory Listing
Modified
Tue Nov 25 14:26:08 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestClassification.test): Add the missing
round trip test.
(TestClassification.file_contents): Update to the newest file
format
Revision
1970 -
Directory Listing
Modified
Mon Nov 24 18:36:00 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1966 -
Directory Listing
Modified
Thu Nov 20 18:15:57 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(ProjFileReadTests.test_read_unreadable_file):
Skip this test if run under non-posix systems since it only works
there
Revision
1962 -
Directory Listing
Modified
Wed Nov 19 15:46:22 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(main): The old table interface is gone and
with it the deprecation warnings so remove the code that turns
these warnings into errors
Revision
1961 -
Directory Listing
Modified
Wed Nov 19 15:46:03 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
(DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
anymore
* Thuban/Model/transientdb.py (TransientTableBase)
(AutoTransientTable): Do not derive from OldTableInterfaceMixin
anymore
* test/test_table.py: Removed since the old interface it tests is
gone.
Revision
1959 -
Directory Listing
Modified
Wed Nov 19 15:31:33 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
Revert to revision 1.5 again. Changing the
tests to use the new table interface is completely wrong since the
whole purpose of the tests in this module is to test the old
interface.
Revision
1957 -
Directory Listing
Modified
Tue Nov 18 15:37:45 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestBriefDescription)
(TestPostGISSimple.test_brief_description): Rename
TestBriefDescription to TestPostGISSimple and the test method to
test_brief_description so that we can add more test methods.
(TestPostGISSimple.test_matches_parameters): New. Test the new
MatchesParameters method
Revision
1953 -
Directory Listing
Modified
Tue Nov 18 13:18:48 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestPublisher.test_unsubscribe_after_destroy): New. Test that
calling Unsubscribe after Destroy doesn't raise an exception
Revision
1948 -
Directory Listing
Modified
Thu Nov 13 18:56:57 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestPostGISSpecialCases)
(TestPostGISIgnoredColumns): Rename the class to
TestPostGISSpecialCases because that better describes the new
cases
(TestPostGISSpecialCases.test_unsupported_types)
(TestPostGISSpecialCases.test): Rename the method to
test_unsupported_types because we need a more descriptive name now
that there are more methods
(TestPostGISSpecialCases.test_table_name_quoting)
(TestPostGISSpecialCases.test_column_name_quoting)
(TestPostGISSpecialCases.test_shapestore_name_quoting): New test
cases to test quoting of table and column names in PostGISTable
and PostGISShapeStore
Revision
1947 -
Directory Listing
Modified
Thu Nov 13 18:56:49 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
AddGeometryColumn desn't support table or column names with sapces
or double quotes
Revision
1938 -
Directory Listing
Modified
Tue Nov 11 18:16:53 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
Avoid warnings when run under Python 2.3
(TestUnicodeStrings.file_contents)
(TestUnicodeStrings.test): Python source code should not contain
non-ascii characters unless an encoding is specified in the file.
Therefore use \x escapes in the string literals for non-ascii
characters.
Revision
1933 -
Directory Listing
Modified
Tue Nov 11 16:37:53 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/resource.py (get_system_proj_file): Add a filename
parameter so that this function can be used for all proj files in
Resource/Projections
(DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
get_system_proj_file
* Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
ProjFile self.__sysProjFile use a dictionary of system ProjFile
objects self._sys_proj_files
(ProjFrame.build_dialog): Adapt to the new changes in the
ProjectionList constructor. Add a check button to toggle whether
EPSG projections are shown
(ProjFrame._OnShowEPSG): New. Handler for the epsg check button
events.
(ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
the busy cursor if the files have not yet been loaded by the
dialog.
(ProjFrame.load_system_proj): Add a parameter for the name of the
proj file. Maintain the dictionary of system projections
self._sys_proj_files
* Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
user_projs parameters into one parameter proj_files which is a
list of proj files.
(ProjectionList._subscribe_proj_files)
(ProjectionList._unsubscribe_proj_files): New. Move
subscription/unsubscription of projfile messages to separate
methods
(ProjectionList.Destroy): The unsubscribe is now done in
_unsubscribe_proj_files
(ProjectionList.update_projections): We now have a list of proj
file objects
(ProjectionList.SetProjFiles): New method to set a new list of
proj file objects
* test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
Specify explicitly which system proj file to load.
Revision
1931 -
Directory Listing
Modified
Tue Nov 11 13:24:45 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestSingleLayer.test_leak): New. test for the
resource leak in load_session
Revision
1928 -
Directory Listing
Modified
Mon Nov 10 16:57:43 2003 UTC
(21 years, 3 months ago)
by
bh
Original Path:
trunk/thuban/test
(SimpleRenderer.draw_raster_data): Add
the format parameter and record it
(TestBaseRenderer.test_raster_no_projection): check the format
paramter of the draw_raster_data method
(TestBaseRenderer.test_renderer_extension): New. Test the renderer
extension facility
Revision
1924 -
Directory Listing
Modified
Fri Nov 7 12:07:11 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestTransientTable.test_auto_transient_table): Make sure that the
data is copied to the transient database at some point.
Revision
1910 -
Directory Listing
Modified
Fri Oct 31 18:16:46 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestClassification.test_set_default_group): New. Test the
SetDefaultGroup method
(TestClassification.test_insert_group): New. Test the InsertGroup
method
(TestClassification.test_remove_group): New. Test the RemoveGroup
method
(TestClassification.test_replace_group): New. Test the
ReplaceGroup method
Revision
1907 -
Directory Listing
Modified
Fri Oct 31 17:35:11 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestClassification.setUp):
Subscribe to the CLASS_CHANGED messages
(TestClassification.tearDown): New. Destroy the classification
properly
(TestClassification.test_defaults): Add tests for the default line
width and whether no messages were sent yet
(TestClassification.test_set_default_properties): Add tests for
messages and setting the default line width
(TestClassification.test_add_singleton)
(TestClassification.test_add_range)
(TestClassification.test_multiple_groups): Add tests for messages
Revision
1905 -
Directory Listing
Modified
Fri Oct 31 17:09:58 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
Some more refactoring in preparation for new tests:
(TestClassification.setUp): New.
Instantiate the classification here. Update the test methods
accordingly.
(TestClassification.test_multiple_groups): Make sure that the two
singletons matching 1 are considered different.
Revision
1903 -
Directory Listing
Modified
Fri Oct 31 16:52:33 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(red, green, blue): New. These
constants were used in several cases. Update the relevant methods.
(TestClassification.test_defaults)
(TestClassification.test_set_default_properties)
(TestClassification.test_add_singleton)
(TestClassification.test_add_range)
(TestClassification.test_multiple_groups)
(TestClassification.test_deepcopy): New. These were formerly all
part of the single method test.
(TestClassification.test_deepcopy): Removed.
(TestClassIterator): Removed. The test case is now a method of
TestClassification since it tests part of the public interface of
Classification
(TestClassification.test_iterator): New. Used to be
TestClassIterator effectively
Revision
1898 -
Directory Listing
Modified
Fri Oct 31 14:38:09 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestClassGroupProperties)
(TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
(TestClassGroupSingleton, TestClassIterator, TestClassification):
Split TestClassification into several classes, one for each class
being tested. TestClassification itself now only tests
Classification. This split makes changes to the tests a bit easier
Revision
1888 -
Directory Listing
Modified
Thu Oct 30 09:31:56 2003 UTC
(21 years, 4 months ago)
by
jan
Original Path:
trunk/thuban/test
(TestProjection.test_get_projection_units_geo):
Added test for alias 'longlat'.
Revision
1872 -
Directory Listing
Modified
Mon Oct 27 17:11:20 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(initthuban): Install a dummy translation
function so that importing Thuban.UI doesn't install a wx specific
one for which would need to import wxPython
Revision
1867 -
Directory Listing
Modified
Mon Oct 27 13:02:13 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestBaseRenderer.test_polygon_no_projection)
(TestBaseRenderer.test_raster_no_projection)
(TestBaseRenderer.test_point_map_projection)
(TestBaseRenderer.test_point_layer_and_map_projection)
(TestBaseRenderer.test_point_layer_projection)
(TestBaseRenderer.test_point_with_classification): Adapt to new
renderer interface
Revision
1864 -
Directory Listing
Modified
Fri Oct 24 17:25:53 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestShapeCentroid.test_invalid_shape_id):
New. test whether an exception is raised for invalid shape ids
Revision
1848 -
Directory Listing
Modified
Tue Oct 21 11:06:56 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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 -
Directory Listing
Modified
Tue Oct 21 10:49:53 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(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
1845 -
Directory Listing
Modified
Tue Oct 21 10:49:50 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(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
1842 -
Directory Listing
Modified
Tue Oct 21 10:49:20 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
New. Effectively a copy of test_load.py
as of Thuban 0.9. These are now tests to determine whether Thuban
can still read files generated by Thuban 0.9
Revision
1839 -
Directory Listing
Modified
Tue Oct 21 09:58:51 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(ThubanTestResult.getDescription): Override to
give a better short description. The description can be used as a
parameter to run_tests to run that particular test in isolation.
Revision
1838 -
Directory Listing
Modified
Tue Oct 21 09:58:43 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(main): Let the user specify which tests to run
on the command line
Revision
1831 -
Directory Listing
Modified
Thu Oct 16 16:36:11 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjFile): Clarify the doc-string
(ProjFileReadTests): Update doc-string
(ProjFileReadTests.test_get_system_proj_file): Check whether the
system proj files is cached.
(ProjFileLoadTestCase): New base class for the proj file tests
derived from support.FileLoadTestCase to provide some common
behavior.
(TestLoadingProjFile)
(TestLoadingProjFileWithEmptyProjectionlist.file_contents)
(TestProjFileWithInvalidParameters.file_contents): Derive from
ProjFileLoadTestCase
(TestLoadingProjFile.test_caching): New. Test whether the cache
works
Revision
1827 -
Directory Listing
Modified
Tue Oct 14 16:04:35 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
Execute support.run_tests when run as
__main__ so that missing unsubscribes are detected
(TestProjFile.tearDown): Destroy the proj_file properly
Revision
1825 -
Directory Listing
Modified
Tue Oct 14 15:21:17 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjFile.setUp): Subscribe to some of the
proj file messages
(TestProjFile.test_add_remove)
(TestProjFile.test_remove_non_existing)
(TestProjFile.test_replace)
(TestProjFile.test_replace_non_existing): Test whether the right
messages are sent
Revision
1821 -
Directory Listing
Modified
Tue Oct 14 13:54:03 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjFile.test): Refactor into several
tests
(TestProjFile.test_add_remove)
(TestProjFile.test_remove_non_existing)
(TestProjFile.test_replace)
(TestProjFile.test_replace_non_existing): Some of the new
individual test cases
(TestProjFileSimple): New class for the rest of the test cases
that came out of the refactoring
(ProjFileTest): Derive from xmlsupport.ValidationTest so that the
derived classes don't have to
Revision
1818 -
Directory Listing
Modified
Mon Oct 13 15:54:14 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjection.test_label)
(TestProjection.test_label_epsg)
(TestProjection.test_epsgcode_for_non_epsg_projection)
(TestProjection.test_epsgcode_for_real_epsg_projection): New tests
for the label and EPSGCode methods
(WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
(WriteProjFileTests.test_write_empty_file): Create the ProjFile
objects in the test cases and put the expected contents into the
test case methods too. Update doTestWrite accordingly
(TestLoadingProjFile)
(TestLoadingProjFileWithEmptyProjectionlist): New classes with the
read tests from TestProjFile.
(TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
tests are now in the new classes.
(sample_projfile, sample_projfile_data)
(sample_projfile2, sample_projfile_data2): Removed. Not used
anymore.
(TestProjFile.test_read_unreadable_file): No need to reset the
permissions at the end anymore since we use a unique filename
Revision
1813 -
Directory Listing
Modified
Mon Oct 13 14:01:37 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
Some more refactoring of the test cases
(ProjFileTest): New base class for the proj file tests.
(TestProjFile): Derive from ProjFileTest
(TestProjFile.test_read_unreadable_file)
(TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
the new filename method to get a unique filename
(TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
(WriteProjFileTests): New class for proj file write tests.
Contains the write test that were in TestProjFile originally.
Revision
1811 -
Directory Listing
Modified
Mon Oct 13 13:36:34 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjFile.testRead)
(TestProjFile.test_read_non_existing_file)
(TestProjFile.test_read_unreadable_file)
(TestProjFile.test_read_empty_file): Split into several methods.
Revision
1798 -
Directory Listing
Modified
Thu Oct 9 10:17:49 2003 UTC
(21 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjection.test_get_parameter_without_equals_sign): New. Test
whether GetParameter handles parameters without "=" sign correctly
Revision
1793 -
Directory Listing
Modified
Wed Oct 8 16:04:01 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjection.test_get_projection_units_geo)
(TestProjection.test_get_projection_units_normal): New. Tests for
the Projection.GetProjectedUnits method
Revision
1787 -
Directory Listing
Modified
Wed Oct 8 10:39:18 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestProjFile.doTestRead): Check the warnings.
(TestProjFileWithInvalidParameters.file_contents): New test cases
to test whether read_proj_file handles invalid projection
parameters correctly
(TestProjFile.test_get_system_proj_file): New. Simple test for
resource.get_system_proj_file
Revision
1784 -
Directory Listing
Modified
Tue Oct 7 17:17:22 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestDerivedShapeStoreExceptions.tearDown): Clear the session
properly so that the temporary directories get deleted correctly
Revision
1781 -
Directory Listing
Modified
Mon Oct 6 17:31:44 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(ViewPortTest.setUp): Also subscribe to
the TITLE_CHANGED messages
(ViewPortTest.test_forwarding_title_changed): New test to check
whether the viewport forwards the map's TITLE_CHANGED messages
(TestViewportWithPostGIS.tearDown): Call the map's Destroy method
after the port's because the latter may require a still functional
map.
Revision
1779 -
Directory Listing
Modified
Mon Oct 6 17:30:51 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_connector.py (TestPublisher.test_issue_simple): Fix
typo
(MyConduit): Helper class for the Conduit test.
(TestConduit): Test cases for Conduit
* test/test_connector.py: Use support.run_tests as main.
Revision
1774 -
Directory Listing
Modified
Mon Oct 6 13:09:18 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(ViewPortTest.setUp)
(SimpleViewPortTest.test_init_with_size): Move the test for the
initial size as a constructor parameter from ViewPortTest.setUp
method to a new separate test in SimpleViewPortTest.
Revision
1772 -
Directory Listing
Modified
Mon Oct 6 11:28:48 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(MockView): New class derived from
ViewPort with a mock implementation of GetTextExtent to be used in
the test cases
(ViewPortTest.setUp): Use MockView instead of ViewPort
Revision
1768 -
Directory Listing
Modified
Thu Oct 2 15:15:04 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.test_empty_layer): Explicitly
close the dbf file we create so that it's contents have been
written properly.
Revision
1756 -
Directory Listing
Modified
Fri Sep 26 14:03:51 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(sample_projfile, sample_projfile2): Use
'projectionlist' as the name in the document type declaration just
as it is done now in the files thuban would write
(sample_projfile, sample_projfile_data): Fix spelling of
"Mercator"
(TestProjFile.doTestWrite): Validate the written and the expected
XML data
(TestProjFile): Derive from ValidationTest so that we can run xml
validation tests
Revision
1740 -
Directory Listing
Modified
Tue Sep 23 12:26:19 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
New. Test cases for wxproj.so. One test
implicitly tests for the fix to RT#2096
Revision
1739 -
Directory Listing
Modified
Tue Sep 23 12:25:56 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(FloatComparisonMixin.assertFloatSeqEqual):
Check that the sequences have the same lengths
Revision
1736 -
Directory Listing
Modified
Mon Sep 22 18:46:56 2003 UTC
(21 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(initthuban): Make sure to unset the LANG env.
var. so that tests that compare translated strings work.
Revision
1693 -
Directory Listing
Modified
Mon Sep 1 11:23:26 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py
(PostGISTable): Extend doc-string
(PostGISTable._fetch_table_information): Set the column index
correctly, pretending ignored columns don't exist.
* test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
for postgis tables with data types not yet supported by thuban.
Revision
1687 -
Directory Listing
Modified
Fri Aug 29 10:02:16 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
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 -
Directory Listing
Modified
Thu Aug 28 15:20:57 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1682 -
Directory Listing
Modified
Thu Aug 28 14:40:28 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Make this file callable as a
program to execute the tests
(TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
the session to self.session so that it gets destroyed properly
Revision
1681 -
Directory Listing
Modified
Thu Aug 28 14:37:36 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.tearDown): Call the session's
Destroy method
Revision
1680 -
Directory Listing
Modified
Thu Aug 28 14:33:12 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestMapBase.tearDown): Destroy self.session
too if it exists
(TestMapAddLayer.test_add_layer): Bind the session to self.session
so that it gets destroyed properly
Revision
1679 -
Directory Listing
Modified
Thu Aug 28 14:23:08 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(reason_for_not_running_tests): Add a
test for the existence of popen2.Popen4.
Revision
1678 -
Directory Listing
Modified
Thu Aug 28 13:36:23 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(SaveSessionTest.testLayerProjection): Bind the session to
self.session so that it gets destroyed properly
Revision
1677 -
Directory Listing
Modified
Thu Aug 28 13:34:28 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(SaveSessionTest.tearDown): New. Provide a
reliable way to destroy the sessions created in the test cases
(SaveSessionTest.test_dbf_table): Bind the session to self.session
so that it gets destroyed properly
Revision
1676 -
Directory Listing
Modified
Thu Aug 28 13:14:44 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(UnreferencedTablesTests.tearDown): Make
sure that the session is destroyed properly
Revision
1673 -
Directory Listing
Modified
Thu Aug 28 13:04:44 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(print_garbage_information): Call initthuban
here because it may be called indirectly from test cases that test
test support modules which do not use anything from thuban itself
(ThubanTestProgram.runTests): Remove unnecessary debug print
Revision
1671 -
Directory Listing
Modified
Thu Aug 28 10:28:44 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Tweak the wording a little because many tests are
not really unittest.
Revision
1664 -
Directory Listing
Modified
Wed Aug 27 15:20:54 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1662 -
Directory Listing
Modified
Wed Aug 27 13:51:01 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Make the table interface distinguish between row ids (an integer
that uniquely identifies a row) and row ordinals (a simple row
count from 0 to NumRows() - 1)
* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
(PostGISTable.RowOrdinalToId): New methods to conver between row
ids and row ordinals
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
parameter row_is_ordinal to indicate whether the row parameter is
the row id or the ordinal
* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
(TransientTableBase.RowOrdinalToId)
(AutoTransientTable.RowIdToOrdinal)
(AutoTransientTable.RowOrdinalToId): Same new methods as in
PostGISTable.
(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
Same new parameter as in PostGISTable.
* Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
(DBFTable.ReadValue, DBFTable.ReadRowAsDict)
(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
parameter as in PostGISTable.
* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
(DataTable.RowOrdinalToId): New methods to convert between row ids
and row ordinals.
(TableGrid.SelectRowById): New method to select a row based on its
ID as opposed to its ordinal
(DataTable.GetValue, TableGrid.OnRangeSelect)
(TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
(QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
(LayerTableFrame.__init__): Convert between row ids and row
ordinals as appropriate
* test/postgissupport.py (PostGISDatabase.__init__): Add
doc-string.
(PostGISDatabase.initdb): The optional third item in a tuple in
tables is now a (key, value) list with additional arguments to
pass to upload_shapefile
(upload_shapefile): New parameter gid_offset to allow gids that
are not the same as the shapeids in the shapefile
(PostgreSQLServer.get_default_static_data_db): Use the new
gid_offset to make the gids in landmarks 1000 higher than the
shapeids in the shapefile
* test/test_viewport.py
(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
new shapeids in the landmarks table
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Add tests for
the new table methods and new keywords arguments.
* test/test_postgis_db.py
(TestPostGISTable.test_read_row_as_dict_row_count_mode)
(TestPostGISTable.test_read_value_row_count_mode)
(TestPostGISTable.test_row_id_to_ordinal)
(TestPostGISTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
(TestPostGISShapestorePoint.test_shapes_in_region)
(TestPostGISShapestorePoint.test_shape_raw_data)
(TestPostGISShapestorePoint.test_shape_points)
(TestPostGISShapestorePoint.test_shape_shapeid)
(TestPostGISShapestorePoint.test_all_shapes)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_simple_query)
(TestPostGISTable.test_read_value)
(TestPostGISTable.test_read_row_as_dict): Adapt to the new
shapeids in the landmarks table
* test/test_memory_table.py
(TestMemoryTable.test_read_row_as_dict_row_count_mode)
(TestMemoryTable.test_read_value_row_count_mode)
(TestMemoryTable.test_row_id_to_ordinal)
(TestMemoryTable.test_row_oridnal_to_id): New test for the new
table methods and the new arguments
* test/test_dbf_table.py
(TestDBFTable.test_read_row_as_dict_row_count_mode)
(TestDBFTable.test_read_value_row_count_mode)
(TestDBFTable.test_row_id_to_ordinal)
(TestDBFTable.test_row_oridnal_to_id): New test for the new table
methods and the new arguments
Revision
1658 -
Directory Listing
Modified
Tue Aug 26 10:34:48 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (PostGISTable.Title)
(PostGISShapeStore.AllShapes): Add these missing methods.
(PostGISShapeStore.ShapesInRegion): No need to raise
StopIteration. We can simply return
* test/test_postgis_db.py (TestPostGISTable.test_title)
(TestPostGISShapestorePoint.test_all_shapes): New tests for the
new methods
Revision
1656 -
Directory Listing
Modified
Mon Aug 25 18:26:54 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
* test/test_postgis_db.py (PolygonTests): New class containing
those tests from TestPostGISShapestorePolygon that can also be
used to test MUTLIPOLYGON tables
(TestPostGISShapestorePolygon): Most tests are now in PolygonTests
so derive from that
(TestPostGISShapestoreMultiPolygon): New class with tests for
MUTLIPOLYGON tables
* test/postgissupport.py (PostGISDatabase.initdb): Allow the
tables argument to have tuples with three items to override the
WKT type used.
(PostgreSQLServer.get_default_static_data_db): Use the above to
create a polygon table with MUTLIPOLYGONs
(point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
(arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
coords_to*
(coords_to_multipolygon): New. Convert to MUTLIPOLYGON
(wkt_converter): New. Map WKT types to converters
(upload_shapefile): New parameter force_wkt_type to use a
different WKT type than the default
Revision
1646 -
Directory Listing
Modified
Mon Aug 25 13:43:56 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
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 -
Directory Listing
Modified
Mon Aug 25 10:54:31 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1640 -
Directory Listing
Modified
Fri Aug 22 18:24:44 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(SaveSessionTest.test_dbf_table)
(SaveSessionTest.test_joined_table): Add XML validation tests.
Revision
1638 -
Directory Listing
Modified
Fri Aug 22 18:19:14 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1636 -
Directory Listing
Modified
Fri Aug 22 17:20:29 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/postgisdb.py (ConnectionError): New exception class
for exceptions occurring when establishing a Database connection
(PostGISConnection.connect): Catch psycopg.OperationalError during
connects and raise ConnectionError.
* test/test_postgis_db.py (TestPostgisDBExceptions): New class for
tests for database exceptions
Revision
1634 -
Directory Listing
Modified
Fri Aug 22 16:55:19 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Prepare the test suite for tests with required authentication
* test/postgissupport.py (PostgreSQLServer.__init__): Add instance
variables with two predefined users/passwords, one for the admin
and one for a non-privileged user.
(PostgreSQLServer.createdb): Pass the admin name to initdb and add
the non-privileged user to the database and set the admin password
(PostgreSQLServer.wait_for_postmaster): Use the admin user name.
Better error reporting
(PostgreSQLServer.connection_params)
(PostgreSQLServer.connection_string): New methods to return
information about how to connect to the server
(PostgreSQLServer.execute_sql): New. Convenience method to execute
SQL statements
(PostgreSQLServer.require_authentication): Toggle whether the
server requires authentication
(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
Add or alter users
(PostGISDatabase.initdb): Pass the admin name one the
subprocesses' command lines. Grant select rights on
geometry_columns to everybody.
(upload_shapefile): Use the admin name and password when
connecting. Grant select rights on the new table to everybody.
* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
server's new methods to get the connection parameters.
* test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
server's new methods to get the connection parameters.
* test/test_postgis_db.py
(TestPostGISConnection.test_gis_tables_empty)
(TestPostGISConnection.test_gis_tables_non_empty)
(PostGISStaticTests.setUp): Use the server's new methods to get
the connection parameters.
Revision
1620 -
Directory Listing
Modified
Wed Aug 20 13:14:22 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Add dialogs and commands to open database connections and add
database layers.
* Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
method to open the database connection management dialog
(MainWindow.AddDBLayer): New method to add a layer from a database
(_has_dbconnections): New helper function to use for sensitivity
(database_management command, layer_add_db command): New commands
that call the above new methods.
(main_menu): Add the new commands to the menu.
* Thuban/Model/postgisdb.py (PostGISConnection.__init__)
(PostGISConnection.connect): Establish the actual connection in a
separate method and call it in __init__. This makes it easier to
override the behavior in test cases
(PostGISConnection.BriefDescription): New method to return a brief
description for use in dialogs.
* test/test_postgis_db.py (NonConnection): DB connection that
doesn't actually connect
(TestBriefDescription): New class with tests for the new
BriefDescription method
Revision
1608 -
Directory Listing
Modified
Tue Aug 19 12:51:20 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(ViewPortTest): We don't use the
facilities of FileTestMixin so don't derive from it.
(TestViewportWithPostGIS): New class with tests for using a
viewport on a map with postgis layers.
Revision
1607 -
Directory Listing
Modified
Tue Aug 19 12:50:35 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Add the db connection management to the session.
* Thuban/Model/session.py (Session.__init__): New instance
variable db_connections
(Session.AddDBConnection, Session.DBConnections)
(Session.HasDBConnections, Session.CanRemoveDBConnection)
(Session.RemoveDBConnection): New methods to manage and query the
db connections managed by the session
(Session.OpenDBShapeStore): New method to open a shapestore from a
db connection
* Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
messages for the db connection handling in the session
* test/test_postgis_session.py: New. test cases for the session's
db connection handling with postgis connections
Revision
1605 -
Directory Listing
Modified
Tue Aug 19 11:00:40 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Add very basic postgis database support and the corresponding test
cases. The test cases require a PostgreSQL + postgis installation
but no existing database. The database will be created
automatically by the test cases
* test/README: Add note about skipped tests and the requirements
of the postgis tests.
* Thuban/Model/postgisdb.py: New. Basic postgis database support.
* test/test_postgis_db.py: New. Test cases for the postgis
support.
* Thuban/Model/wellknowntext.py: New. Parser for well-known-text
format
* test/test_wellknowntext.py: New. Test cases for the
wellknowntext parser
* test/postgissupport.py: New. Support module for tests involving
a postgis database.
* test/support.py (execute_as_testsuite): Shut down the postmaster
if it's still running after the tests
* Thuban/Model/data.py (RAW_WKT): New constant for raw data in
well known text format
Revision
1601 -
Directory Listing
Modified
Mon Aug 18 17:22:07 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/support.py (ThubanTestResult.printErrors): Indent the
reason for the skips in the output to make it a bit more readable.
(execute_as_testsuite): New helper function to run a test suite
and print some more information.
(run_tests): Use execute_as_testsuite to run the tests
* test/runtests.py (main): Use execute_as_testsuite to run the
tests
Revision
1599 -
Directory Listing
Modified
Mon Aug 18 12:45:28 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1593 -
Directory Listing
Modified
Fri Aug 15 14:10:27 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Change the way shapes are returned by a shape store. The
ShapesInRegion method returns an iterator over actual shape
objects instead of a list of shape ids.
* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
id.
(ShapefileStore.ShapesInRegion): Return an iterator over the
shapes which yields shape objects instead of returning a list of
shape ids
(ShapefileStore.AllShapes): New. Return an iterator over all
shapes in the shape store
(DerivedShapeStore.AllShapes): New. Like in ShapefileStore
* Thuban/Model/layer.py (Layer.ShapesInRegion): Update
doc-string.
* Thuban/UI/baserenderer.py
(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
layer_shapes and make it return an iterator containg shapes
instead of a list of ids.
(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
layer_shapes() change
* Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
(ScreenRenderer.layer_shapes): Rename as in BaseRenderer
* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
changes in the ShapesInRegion return value.
(ViewPort._get_hit_tester): Remove commented out code
* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
new return value.
(SimpleShapeStore.AllShapes): New. Implement this method too.
* test/test_layer.py (TestLayer.test_arc_layer)
(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
(TestLayer.test_point_layer_with_projection)
(TestLayer.test_derived_store): Adapt to changes in the
ShapesInRegion return value.
* test/test_shapefilestore.py
(TestShapefileStoreArc.test_shapes_in_region)
(TestShapefileStorePolygon.test_shapes_in_region)
(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
in the ShapesInRegion return value.
(TestShapefileStorePoint.test_all_shapes)
(TestShapefileStoreArc.test_shape_shapeid): New tests for the new
methods
* test/test_derivedshapestore.py
(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
the ShapesInRegion return value.
(TestDerivedShapeStore.test_all_shapes)
(TestDerivedShapeStore.test_shape_shapeid): New tests for the new
methods
Revision
1591 -
Directory Listing
Modified
Fri Aug 15 14:00:53 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Make the renderers deal correctly with raw vs. python level
representation of shape geometries
* Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
Return a flag useraw in addition to the callable and the parameter
to indicate whether the callable can deal with the raw shape data
or uses the higher level python lists of coordinates. The callable
now should accept either the raw data or the return value of the
shape's Points() method.
(BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
change
(BaseRenderer.projected_points): Instead of the shape id use the
points list as parameter.
(BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
(BaseRenderer.draw_point_shape): Adapt to projected_points()
change and accept the points list as parameter instead of the
shape id.
* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
the useraw flag as required by the BaseRenderer
(ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
changes.
* test/test_baserenderer.py
(TestBaseRenderer.test_point_with_classification): New test for
rendering a map with classifications.
Revision
1589 -
Directory Listing
Modified
Fri Aug 15 12:49:08 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/UI/viewport.py (ViewPort.find_shape_at)
(ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
(ViewPort._get_hit_tester, ViewPort.projected_points)
(ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
(ViewPort._find_label_at): Split the find_shape_at method into
several new methods and use the functions in the hit-test module.
* Thuban/UI/hittest.py: New module with Python-level hit-testing
functions
* test/test_hittest.py: New. Test for the new hittest module
Revision
1587 -
Directory Listing
Modified
Fri Aug 15 10:31:07 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
projection to all corners of the bounding box to get a better
approximation of the projected bounding box
* test/test_layer.py (TestLayer.test_point_layer_with_projection):
New. Test coordinate handling of a layer with a projection.
Catches the bug fixed in Layer.ShapesInRegion
Revision
1585 -
Directory Listing
Modified
Fri Aug 15 10:26:40 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Move some of the mock objects in test_baserenderer into their own
module so they can easily be used from other tests
* test/mockgeo.py: New test helper module with some mock objects
for geometry related things like shapes, shapestores and
projections.
* test/test_mockgeo.py: New. Tests for the new helper module
* test/test_baserenderer.py: Some of the mock-objects are in mockgeo now.
Revision
1577 -
Directory Listing
Modified
Mon Aug 11 12:08:28 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(ShapefileStoreTests.assertPointListEquals): Removed. It's now in
FloatComparisonMixin
Revision
1576 -
Directory Listing
Modified
Mon Aug 11 12:08:26 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.assertPointListEquals): Removed.
It's now in FloatComparisonMixin
Revision
1575 -
Directory Listing
Modified
Mon Aug 11 12:08:21 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestDerivedShapeStore.assertPointListEquals): Removed. It's now
in FloatComparisonMixin
Revision
1574 -
Directory Listing
Modified
Mon Aug 11 12:07:47 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
(FloatComparisonMixin.assertPointListEquals):
New. This method was used in various derived classes, but it's
better to have it here.
Revision
1564 -
Directory Listing
Modified
Thu Aug 7 19:19:56 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
Simply delegates to the original shapestore.
* test/test_derivedshapestore.py
(TestDerivedShapeStore.test_raw_format): New. Test case for
DerivedShapeStore.RawShapeFormat
Revision
1557 -
Directory Listing
Modified
Thu Aug 7 17:29:46 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
(SimpleShape): Shape class for the
tests.
(SimpleShapeStore.Shape): Use SimpleShape instead of
Thuban.Model.data.Shape to make the tests independed of the coming
changes.
Revision
1555 -
Directory Listing
Modified
Thu Aug 7 15:41:05 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
(ThubanTestProgram): New classes that extend the respective
classes from unittest. These new version support skipping tests
under certain expected conditions. In the Thuban test suite we
uses this for tests that require the optional gdal support.
(run_tests): Use ThubanTestProgram instead of the unittest.main()
* test/runtests.py (main): Use the new ThubanTestRunner instead of
the normal one from unittest
* test/test_layer.py (TestLayer.test_raster_layer): If this test
is not run because gdal support isn't available report this to the
runner.
* test/test_baserenderer.py
(TestBaseRenderer.test_raster_no_projection): Do not run this test
if gdal support isn't available and report this to the runner.
Revision
1552 -
Directory Listing
Modified
Wed Aug 6 17:21:32 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
this class is now in BaseRenderer. This class is now practically
only a specialization of BaseRenderer for rendering to an actual
wx DC.
(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
to get the shapetype specific rendering functions.
* test/test_baserenderer.py: New. Test cases for BaseRenderer
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
error_on_redraw to guard agains endless loops and stack overflows
when there's a bug in the rendering code that raises exceptions.
(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
rendering into a separate method _do_redraw so that error handling
is a bit easier. When an exception occurs, set error_on_redraw to
true. When it's true on entry to OnIdle do nothing and return
immediately.
Revision
1551 -
Directory Listing
Modified
Wed Aug 6 17:21:07 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
Shape object will always have the coordinates as a list of list of
coordinate pairs (tuples).
(Shape.compute_bbox): Adapt to new representation.
* Thuban/UI/viewport.py (ViewPort.find_shape_at)
(ViewPort.LabelShapeAt): Adapt to new coordinate representation in
Shape objects.
* test/test_shapefilestore.py
(ShapefileStoreTests.assertFloatTuplesEqual)
(ShapefileStoreTests.assertPointListEquals): Rename to
assertPointListEquals and change purpose to checking equality of
the lists returned by Shape.Points().
(TestShapefileStoreArc.test_shape)
(TestShapefileStorePolygon.test_shape)
(TestShapefileStorePoint.test_shape): Use the new
assertPointListEquals instead of assertFloatTuplesEqual
* test/test_layer.py (TestLayer.assertFloatTuplesEqual)
(TestLayer.assertPointListEquals): Rename to assertPointListEquals
and change purpose to checking equality of the lists returned by
Shape.Points().
(TestLayer.test_arc_layer, TestLayer.test_arc_layer)
(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
(TestLayer.test_derived_store): Use the new assertPointListEquals
instead of assertFloatTuplesEqual
* test/test_derivedshapestore.py
(TestDerivedShapeStore.assertFloatTuplesEqual)
(TestDerivedShapeStore.assertPointListEquals): Rename to
assertPointListEquals and change purpose to checking equality of
the lists returned by Shape.Points().
(TestDerivedShapeStore.test_shape): Use the new
assertPointListEquals instead of assertFloatTuplesEqual
Revision
1547 -
Directory Listing
Modified
Tue Aug 5 12:38:58 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestColor.test_repr)
(TestColor.test_equality, TestColor.test_inequality): New. test
some more apects of the Color class
(TestTransparent.test_repr, TestTransparent.test_hex)
(TestTransparent.test_equality): New. Test cases for the
Transparent object.
Revision
1538 -
Directory Listing
Modified
Fri Aug 1 14:27:46 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
Import the SHAPETYPE_* constants from data
instead of layer.
(TestLayer.test_derived_store): Remove the test for the exception
when instantiating the DerivedShapeStore with an incompatible
table which is now in test_derivedshapestore.py. Add some more
tests of the layer methods to determine whether they work for a
DerivedShapeStore as well.
Revision
1476 -
Directory Listing
Modified
Thu Jul 24 15:16:15 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
(main): Recognize the long "verbose" option
correctly.
Revision
1464 -
Directory Listing
Modified
Fri Jul 18 18:20:40 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/UI/messages.py (MAP_REPLACED): New message.
* Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
after the new map has been assigned
* Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
Delegate MAP_REPLACED to the canvas too
(MainWindow.prepare_new_session): Removed. Thanks to the new
MAP_REPLACED message it's no longer needed
(MainWindow.OpenSession, MainWindow.NewSession):
prepare_new_session has been removed.
* Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
MAP_REPLACED so that we can close the dialog if a new map is set.
(Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
(Classifier.map_replaced): Handle MAP_REPLACED by closing the
dialog
* test/test_viewport.py (SimpleViewPortTest)
(SimpleViewPortTest.test_default_size): Add doc-strings
(ViewPortTest.setUp): Bind map to self.map so we can use it in
tests. Subscribe to MAP_REPLACED messages too.
(ViewPortTest.tearDown): No need to explicitly unsubscribe
(ViewPortTest.test_set_map): New test for the SetMap method.
Revision
1462 -
Directory Listing
Modified
Fri Jul 18 15:33:35 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
(SimpleViewPortTest.test_default_size):
Move this test from ViewPortTest.setUp to this new separate test
case. setUp is not the place for the actual tests.
(ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
more of the test from setUp to the new test test_inital_settings.
(ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
(ViewPortTest.test_proj_conv): Split test_proj_conv into
test_win_to_proj and test_proj_to_win and make the tests easier to
understand
(ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
(ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
(ViewPortTest.test_unprojected_rect_around_point)
(ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
Reformat to increase readability.
Revision
1458 -
Directory Listing
Modified
Fri Jul 18 15:09:22 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
The test suite can now be run without an X
connection. To make sure this remains true, remove the DISPLAY
environment variable so that an error occurs if the wxGTK is
imported accidentally
Revision
1454 -
Directory Listing
Modified
Fri Jul 18 14:41:04 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_export.py Remove unused imports. The OutputTransform
function is now in viewport.py and is called output_transform
(TestScalebar.test_output_transform)
(TestScalebar.test_OutputTransform): Renamed to
test_output_transform and updated to use output_transform instead
of OutputTransform
* Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
renamed.
(MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
renamed to output_transform
* Thuban/UI/viewport.py (OutputTransform, output_transform):
Rename to output_transform
Revision
1452 -
Directory Listing
Modified
Fri Jul 18 12:57:59 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1450 -
Directory Listing
Modified
Fri Jul 18 10:18:56 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestFixedRamp.test): Extend test to check
the non-fixed values as well. The old test would have accepted
a fixed ramp that only returnes the fixed properties
Revision
1439 -
Directory Listing
Modified
Wed Jul 16 13:25:42 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SaveSessionTest.testClassifiedLayer): Use
SetClassificationField on layer to set class field info.
Revision
1438 -
Directory Listing
Modified
Wed Jul 16 13:25:30 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SetShapeStoreTests.setUp): Classification
__init__ no longer has a field parameter, use SetClassificationField.
(SetShapeStoreTests.test_sanity): Use layer object to get class field info.
Revision
1437 -
Directory Listing
Modified
Wed Jul 16 13:25:16 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestClassification.test_classification): Remove tests for methods
that no longer exist.
Revision
1421 -
Directory Listing
Modified
Tue Jul 15 14:46:55 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/support.py (FloatComparisonMixin): This is a mix-in class
and therefore should not be derived from any other class.
* test/test_range.py (RangeTest): FloatComparisonMixin is a
mix-in, so derive from TestCase as well.
Revision
1417 -
Directory Listing
Modified
Tue Jul 15 08:43:53 2003 UTC
(21 years, 7 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1410 -
Directory Listing
Modified
Mon Jul 14 10:09:11 2003 UTC
(21 years, 7 months ago)
by
frank
Original Path:
trunk/thuban/test
(TestUnicodeStrings): New, test load of unicode strings from session file:
session title, map title and projection name.
Revision
1402 -
Directory Listing
Modified
Thu Jul 10 14:56:38 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TableTest): Update tests to use non-deprecated functions.
Revision
1401 -
Directory Listing
Modified
Thu Jul 10 14:56:25 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestSessionWithContent.test_forward_map_projection):
MAP_PROJECTION_CHANGED events send the old projection.
Revision
1400 -
Directory Listing
Modified
Thu Jul 10 14:56:15 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestMapWithContents.test_set_projection):
MAP_PROJECTION_CHANGED events send the old projection.
Revision
1399 -
Directory Listing
Modified
Thu Jul 10 14:56:03 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestTableToDBF.test_table_to_dbf): Add tests for saving selected records.
Revision
1398 -
Directory Listing
Modified
Thu Jul 10 14:55:49 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestCSVTable.test_table_to_cvs): Add tests for saving selected records.
Revision
1397 -
Directory Listing
Modified
Thu Jul 10 14:55:37 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(FloatComparisonMixin.assertFloatEqual): Take
optional epsilon argument to specify floating point accuracy.
(FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
for each item test.
Revision
1396 -
Directory Listing
Modified
Thu Jul 10 14:55:22 2003 UTC
(21 years, 7 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(main): Only print "Unknown option" for unsupported options.
Revision
1381 -
Directory Listing
Modified
Tue Jul 8 16:37:46 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/transientdb.py (TransientTableBase.Width): The type
constants in the column objects are the standard ones defined in
the table module.
* test/test_transientdb.py
(TestTransientTable.test_transienttable_to_dbf): New. Test whether
exporting transient tables as DBF works. This should catch the bug
just fixed in TransientTableBase.Width.
Revision
1379 -
Directory Listing
Modified
Tue Jul 8 13:23:20 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
interpolated colors correctly.
* test/test_classgen.py (TestCustomRamp.test_color_interpolation):
New. Test case for the fix in classgen.py
Revision
1377 -
Directory Listing
Modified
Tue Jul 8 10:54:16 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
(main): Make the default output less verbose
and add a verbosity option (-v) to get the old output
Revision
1375 -
Directory Listing
Modified
Tue Jul 8 10:53:05 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1371 -
Directory Listing
Modified
Fri Jul 4 18:19:16 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/table.py (_find_dbf_column_names): New. Helper
function for table_to_dbf
(table_to_dbf): Deal with names longer than the 10 character limit
* test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
doc-string
(TestTableToDBF.test_table_to_dbf_long_col_names): New test for
long column names
Revision
1364 -
Directory Listing
Modified
Thu Jul 3 13:09:43 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_transientdb.py
(TestTransientTable.test_transient_joined_table_same_column_name):
Update to reflect the new behavior
(TestTransientTable.test_transient_joined_table_with_equal_column_names):
Update to reflect the new behavior
(TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
New test case for a bug which modified the column objects in place
* Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
Update doc-string
(TransientJoinedTable.create): Do not modify the column objects of
the input tables in place and copy all columns of the input tables
into the joined table after all.
Revision
1362 -
Directory Listing
Modified
Wed Jul 2 12:59:34 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(ClassGenTest.doClassRangeTest,
ClassGenTest.doClassSingleTest): Call doBoundsTest to
check the end classification groups against the
proper property values.
(ClassGenTest.doBoundsTest): New. Checks the first and
last classification groups to make sure their properties
are the correct upper and lower bounds for a color ramp.
Revision
1357 -
Directory Listing
Modified
Wed Jul 2 09:38:27 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fix use of ClassGroupRange so that it uses the new signature.
Revision
1356 -
Directory Listing
Modified
Wed Jul 2 09:37:59 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fix tests of ClassGroupRange so that they use the new signature.
Revision
1348 -
Directory Listing
Modified
Tue Jul 1 16:12:28 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SaveSessionTest.testClassifiedLayer):
Change calls to Classification.[SetField|SetFieldType] to
SetFieldInfo.
Revision
1346 -
Directory Listing
Modified
Tue Jul 1 16:11:55 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fix color references and
change calls to Classification.[SetField|SetFieldType] to
SetFieldInfo.
Revision
1345 -
Directory Listing
Modified
Tue Jul 1 16:11:38 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(ClassGenTest.test_generate_singletons):
Fix calls to generate_singletons because the signature changed.
Revision
1332 -
Directory Listing
Modified
Tue Jul 1 15:40:52 2003 UTC
(21 years, 8 months ago)
by
frank
Original Path:
trunk/thuban/test
(TestTransientTable.test_transient_joined_table_with_equal_column_names):
New. Test join of two tables with partly equal column names.
Revision
1328 -
Directory Listing
Modified
Tue Jul 1 12:01:58 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_transientdb.py
(TestTransientTable.test_transient_joined_table_same_column_name):
New. Test whether joining on columns with the same names in both
tables works.
* Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
sure to use the right internal names even when joining on field
with the same names in both tables. Also, detect duplicate names
in the joined table correctly.
Revision
1282 -
Directory Listing
Modified
Mon Jun 23 09:47:18 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1280 -
Directory Listing
Modified
Fri Jun 20 18:29:16 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1278 -
Directory Listing
Modified
Fri Jun 20 17:46:58 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Add tests in each type of layer for HasClassification() and HasShapes()
Revision
1268 -
Directory Listing
Modified
Fri Jun 20 16:10:12 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1266 -
Directory Listing
Modified
Fri Jun 20 14:36:35 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(UnreferencedTablesTests.test_unreferenced_tables_with_joins):
Use the cultural_landmark-point.dbf file for the store so that
the table rows and shape count match.
Revision
1264 -
Directory Listing
Modified
Fri Jun 20 14:15:56 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(RangeTest): Inherit from
support.FloatComparisonMixin now that we don't have
support.FloatTestCase.
Revision
1263 -
Directory Listing
Modified
Fri Jun 20 14:15:43 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(FloatTestCase): Removed since there is
already FloatComparisonMixin. Fixes RTbug #1954.
(FloatComparisonMixin.assertFloatEqual): Include test for
infinity that was part of FloatTestCase.
Revision
1262 -
Directory Listing
Modified
Fri Jun 20 14:15:30 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestLayer.test_derived_store): Add
a test for the new exception in DerivedShapeStore.__init__.
Revision
1259 -
Directory Listing
Modified
Fri Jun 20 12:31:48 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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
1257 -
Directory Listing
Modified
Fri Jun 20 12:22:25 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* 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 -
Directory Listing
Modified
Thu Jun 19 19:53:36 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1245 -
Directory Listing
Modified
Thu Jun 19 19:29:23 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1219 -
Directory Listing
Modified
Mon Jun 16 17:42:54 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
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
1200 -
Directory Listing
Modified
Fri Jun 13 15:04:44 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(XMLWriterTest.Encode): Check return values. Fixes RTbug #1851.
Revision
1173 -
Directory Listing
Modified
Thu Jun 12 13:37:18 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(XMLWriterTest.testEncode): Explicitly check unicode strings.
Revision
1168 -
Directory Listing
Modified
Thu Jun 12 12:42:50 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SaveSessionTest.testClassifiedLayer): New
test for saving classified layers. Fixes RTbug #1902.
(XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
Revision
1166 -
Directory Listing
Modified
Thu Jun 12 12:42:24 2003 UTC
(21 years, 8 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Add tests for generate_singletons,
generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
(test_calculate_quantiles): Fix some tests to catch the new
ValueError that is raised.
Revision
1144 -
Directory Listing
Modified
Tue Jun 10 11:56:55 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
of the receivers list so that unsubscribing in a receiver doesn't
modify it while iterating over it.
* test/test_connector.py
(ConnectorTest.test_disconnect_in_receiver): New. Test whether
unsubscribing in a receiver works correctly. See docstring for
details
Revision
1142 -
Directory Listing
Modified
Tue Jun 10 09:41:57 2003 UTC
(21 years, 8 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
message.
* Thuban/Model/layer.py (Layer.SetShapeStore): Send
LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
LAYER_CHANGED will still be sent if the classification changes.
* Thuban/UI/classifier.py (Classifier.__init__): Add the map as
parameter so we can subscribe to some of its messages
(Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
and the layer's LAYER_SHAPESTORE_REPLACED
(Classifier.unsubscribe_messages): New. Unsubscribe from message
subscribed to in __init__
(Classifier.map_layers_removed)
(Classifier.layer_shapestore_replaced): receivers for the messages
subscribed to in __init__. Unsubscribe and close the dialog
* Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
the map to the Classifier dialog
* test/test_layer.py (SetShapeStoreTests): Derive from
SubscriberMixin as well so we can test messages
(SetShapeStoreTests.setUp): Subscribe to some of the layer's
messages
(SetShapeStoreTests.tearDown): Clear the messages again
(SetShapeStoreTests.test_sanity): Expand the doc-string and check
for the modified flag too
(SetShapeStoreTests.test_set_shape_store_modified_flag): New test
to check whether SetShapeStore sets the modified flag
(SetShapeStoreTests.test_set_shape_store_different_field_name)
(SetShapeStoreTests.test_set_shape_store_same_field)
(SetShapeStoreTests.test_set_shape_store_same_field_different_type):
Add tests for the messages. This checks both the new
LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
Revision
1125 -
Directory Listing
Modified
Mon Jun 2 14:14:32 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestSessionSimple.test_add_table): Test
whether the modified flag is set properly
Revision
1123 -
Directory Listing
Modified
Mon Jun 2 14:10:00 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(SomeTitledObject): Derive from Modifiable
instead of Publisher to reflect reality better and to accomodate
the fact that SetTitle now calls changed instead of issue
Revision
1110 -
Directory Listing
Modified
Fri May 30 09:46:57 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(ClassGenTest.test): Update to reflect the
changes in classgen.py
Revision
1107 -
Directory Listing
Modified
Fri May 30 06:31:02 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestMapWithContents.test_raise_layer_top,
TestMapWithContents.test_lower_layer_bottom):
Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
Fixes RTBug #1907.
Revision
1088 -
Directory Listing
Modified
Wed May 28 12:42:23 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/layer.py (Layer.SetShapeStore): Set the
classification to "None" if the type of the field has changed.
* test/test_layer.py (SetShapeStoreTests): New. Class with a few
test for the Layer.SetShapeStore method
Revision
1078 -
Directory Listing
Modified
Wed May 28 09:07:30 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/table.py (DBFTable.__init__): Omit the extension
when determining the title from the filename.
* test/test_dbf_table.py (TestDBFTable.test_title): Update to
reflect changes in the way the title is derived from the filename
Revision
1068 -
Directory Listing
Modified
Tue May 27 15:02:37 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/messages.py (TABLE_REMOVED): New message.
* Thuban/Model/session.py (Session.UnreferencedTables): New method
to return tables that are not referenced by other tables or shape
stores and can be removed.
(Session.RemoveTable): Issue a TABLE_REMOVED message after
removing the table
* Thuban/UI/mainwindow.py: Remove unused imports
(MainWindow.TableClose): Implement.
* Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
messages so that the frame will be automatically closed when a new
session is opened or the table is removed.
(TableFrame.OnClose): Unsubscribe the Subscriptions made in
__init__
(TableFrame.close_on_session_replaced)
(TableFrame.close_on_table_removed): New. Subscribers that close
the window
* test/test_session.py (TestSessionMessages.test_remove_table)
(TestSessionSimple.test_remove_table): Move the test to
TestSessionSimple and add test for the TABLE_REMOVED message
(TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
(TestSessionSimple.test_unreferenced_tables) New. Test for the
UnreferencedTables method.
(UnreferencedTablesTests): New. Class with some more sophisticated
tests for UnreferencedTables.
Revision
1042 -
Directory Listing
Modified
Mon May 26 19:26:49 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestTableToDBF.test_table_to_dbf): New.
test for table_to_dbf
Revision
1041 -
Directory Listing
Modified
Mon May 26 19:26:41 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestTransientTable.run_iceland_political_tests): Fix a comment.
Revision
1039 -
Directory Listing
Modified
Mon May 26 17:31:24 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestSessionSimple.test_open_table_file):
New. test case for OpenTableFile
Revision
1028 -
Directory Listing
Modified
Mon May 26 11:47:37 2003 UTC
(21 years, 9 months ago)
by
frank
Original Path:
trunk/thuban/test
Test table_to_dbf (extension of former part of test).
Revision
1016 -
Directory Listing
Modified
Fri May 23 11:05:59 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/session.py (Session.AddShapeStore): Define
AddShapeStore analogously to AddTable.
* test/test_session.py (TestSessionSimple.test_add_shapestore):
New. Test for AddShapeStore
Revision
998 -
Directory Listing
Modified
Thu May 22 19:29:39 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
Give the tables titles so that the GUI can display more meaningful
names. For now the titles are fixed but depend on e.g. filenames
or the titles of the joined tables.
* Thuban/Model/transientdb.py (TransientTable.Title)
(TransientJoinedTable.Title, AutoTransientTable.Title): New.
* Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
* test/test_transientdb.py
(TestTransientTable.test_auto_transient_table_title): New. Test
for the Title method
(TestTransientTable.test_transient_joined_table)
(TestTransientTable.test_transient_table): Add test for the Title
methods
* test/test_memory_table.py (TestMemoryTable.test_title): New.
Test for the Title method
* test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
the Title method
Revision
996 -
Directory Listing
Modified
Thu May 22 18:21:10 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
Provide a better way to destroy the layers
(TestLayer.test_base_layer, TestLayer.test_arc_layer)
(TestLayer.test_point_layer, TestLayer.test_empty_layer)
(TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
the new way to destroy the layers.
(TestLayer.test_derived_store): New. Test for using a layer with a
DerivedShapeStore
* Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
filename if the shape store actually has one.
Revision
994 -
Directory Listing
Modified
Thu May 22 18:05:16 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
for the filename
* test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
for the FileName method
(TestDBFTableWriting.test_write): Fix spelling of filename
Revision
993 -
Directory Listing
Modified
Thu May 22 16:54:04 2003 UTC
(21 years, 9 months ago)
by
tkoester
Original Path:
trunk/thuban/test
* Thuban/Model/range.py, test/test_range.py: Brought over new Range
from SciParam that now really is immutable.
Revision
987 -
Directory Listing
Modified
Thu May 22 16:46:14 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/session.py (Session.RemoveTable): New method to
remove tables
* test/test_session.py (TestSessionSimple.test_remove_table): New.
Test for RemoveTable
Revision
984 -
Directory Listing
Modified
Thu May 22 16:37:48 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
Implement a way to discover dependencies between tables and
shapestores.
* Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
(TransientJoinedTable.Dependencies)
(AutoTransientTable.SimpleQuery): New. Implement the dependencies
interface
(TransientJoinedTable.__init__): Keep tack of the original table
objects in addition to the corresponding transient tables.
* Thuban/Model/table.py (DBFTable.Dependencies)
(MemoryTable.Dependencies): New. Implement the dependencies
interface
* Thuban/Model/data.py (ShapeTable): New. Helper class for
ShapefileStore
(ShapefileStore.__init__): Use ShapeTable instead of
AutoTransientTable
(ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
(ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
methods for filename and type
(ShapefileStore.Dependencies): New. Implement the dependencies
interface
(DerivedShapeStore): New class to replace SimpleStore. The main
difference to SimpleStore is that it depends not on a shapefile
but another shapestore which expresses the dependencies a bit
better
(SimpleStore.__init__): Add deprecation warning.
* test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
Test for the Dependencies method.
* test/test_memory_table.py (TestMemoryTable.test_dependencies):
New. Test for the Dependencies method.
* test/test_transientdb.py
(TestTransientTable.test_auto_transient_table_dependencies): New.
Test for the Dependencies method.
(TestTransientTable.test_transient_joined_table): Add test for the
Dependencies method.
* test/test_session.py (TestSessionSimple.setUp)
(TestSessionSimple.tearDown): New. Implement a better way to
destroy the sessions.
(TestSessionSimple.test_initial_state)
(TestSessionSimple.test_add_table): Bind session to self.session
so that it's destroyed by tearDown
(TestSessionSimple.test_open_shapefile): New. Test for
OpenShapefile and the object it returns
Revision
982 -
Directory Listing
Modified
Thu May 22 12:02:15 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/session.py (Session.AddTable): New method to
register tables with the session.
(Session.Tables): Return the tables registered with AddTable too.
* test/test_session.py (TestSessionSimple.test_add_table): New.
Test case for the AddTable method
Revision
970 -
Directory Listing
Modified
Wed May 21 17:25:35 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Copied over tests from SciParam. Removed
tests against importing. Fixes RTBug #1867.
Revision
957 -
Directory Listing
Modified
Wed May 21 17:12:22 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
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
956 -
Directory Listing
Modified
Wed May 21 17:11:17 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
(FileLoadTestCase.filename): New base class for
file loading tests
Revision
948 -
Directory Listing
Modified
Tue May 20 15:27:31 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestTransientTable.test_auto_transient_table_query): Added a test
for using a Column object as the "right" parameter to a query.
Revision
947 -
Directory Listing
Modified
Tue May 20 15:27:19 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Added tests associated with the raster layer code.
Revision
907 -
Directory Listing
Modified
Fri May 16 15:01:04 2003 UTC
(21 years, 9 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/table.py (Table): Remove this compatibility alias
for DBFTable.
* test/test_table.py: Import DBFTable as Table because that alias
doesn't exist anymore.
* Thuban/UI/classgen.py: Remove some unused imports
Revision
904 -
Directory Listing
Modified
Wed May 14 11:16:38 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(FloatTestCase): New. Needed for the Range tests.
Revision
896 -
Directory Listing
Modified
Mon May 12 11:21:14 2003 UTC
(21 years, 9 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Modified Quantile tests to use the new return values.
Revision
884 -
Directory Listing
Modified
Fri May 9 16:34:53 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Explicit imports.
(TestClassification.test_ClassGroupRange): Fix test for new Range class.
Revision
851 -
Directory Listing
Modified
Wed May 7 15:11:12 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/session.py (Session.__init__): New instance
variable shapestores to hold a list of all open shapestore objects
(Session.ShapeStores): New. Accessor method for the shapestores
list.
(Session._add_shapestore, Session._clean_weak_store_refs): New.
Internal methods to maintain the shapestores list.
(Session.Tables): New. Return all tables open in the session.
(Session.OpenShapefile): Insert the new ShapeStore into the
shapestores list.
* test/test_session.py (TestSessionSimple.test_initial_state): Add
tests for ShapeStores and Tables
(TestSessionWithContent.test_shape_stores)
(TestSessionWithContent.test_tables): New. Test cases for
ShapeStores and Tables
Revision
849 -
Directory Listing
Modified
Wed May 7 11:55:31 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
Add comments about the optimizations used.
(AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
Implement the ReadValue table interface method.
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Add tests for
ReadValue
Revision
845 -
Directory Listing
Modified
Tue May 6 18:05:13 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestTransientTable.test_auto_transient_table_query): New. Test
case for AutoTransientTable's SimpleQuery
Revision
842 -
Directory Listing
Modified
Tue May 6 17:13:00 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestTransientTable.test_transient_table_read_twice): Fix
doc-string
(TestTransientTable.test_transient_table_query): New. Test for the
SimpleQuery method
Revision
839 -
Directory Listing
Modified
Tue May 6 15:54:18 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
Convert all table users to use the new table interface. This only
covers Thuban itself, not GREAT-ER or other applications built on
Thuban yet, so the compatibility interface stays in place for the
time being but it now issues DeprecationWarnings.
Finally, the new Table interface has a new method, HasColumn.
* Thuban/Model/table.py (OldTableInterfaceMixin): All methods
issue deprecation warnings when they're. The warnings refer to the
caller of the method.
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method
for the deprecation warnings
* test/test_table.py: Ignore the deprecation warnings for the old
table in the tests in this module. The purpose of the tests is to
test the old interface, after all.
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests): Use the
constants for the types. Add a test for HasColumn
(TestTransientTable.test_transient_joined_table): Adapt to new
table interface. Add a test for HasColumn
(TestTransientTable.test_transient_table_read_twice): Adapt to new
table interface
* Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
(AutoTransientTable.HasColumn): Implement the new table interface
method
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
(AutoTransientTable.UniqueValues): Adapt to new table interface
* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
Adapt to new table interface
* test/test_layer.py (TestLayer.open_shapefile): Helper method to
simplify opening shapefiles a bit easier.
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
(TestLayer.test_point_layer): Use the new helper method
(TestLayer.test_get_field_type): New. Test for the GetFieldType
method
* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
the new table method
* test/test_memory_table.py (TestMemoryTable.test_has_column):
Test for the new table method HasColumn
Revision
832 -
Directory Listing
Modified
Tue May 6 12:07:36 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestLayer.test_arc_layer): Add some tests for Layer.ShapesBoundingBox().
Revision
818 -
Directory Listing
Modified
Mon May 5 17:18:31 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
Convert the table implementations to a new table interface. All
tables use a common mixin class to provide backwards compatibility
until all table users have been updated.
* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
provide backwards compatibility for table classes implementing the
new interface
(DBFTable, MemoryTable): Implement the new table interface. Use
OldTableInterfaceMixin as base for compatibility
(DBFColumn, MemoryColumn): New. Column description for DBFTable
and MemoryTable resp.
* test/test_dbf_table.py: New. Test cases for the DBFTable with
the new table interface.
* test/test_memory_table.py: New. Test cases for the MemoryTable
with the new table interface.
* test/test_table.py: Document the all tests in this file as only
for backwards compatibility. The equivalent tests for the new
interface are in test_memory_table.py and test_dbf_table.py
(MemoryTableTest.test_read): field_info should be returning tuples
with four items
(MemoryTableTest.test_write): Make doc-string a more precise.
* Thuban/Model/transientdb.py (TransientTableBase): Convert to new
table interface. Derive from from OldTableInterfaceMixin for
compatibility.
(TransientTableBase.create): New intance variable column_map to
map from names and indices to column objects
(TransientTable.create): Use the new table interface of the input
table
(AutoTransientTable): Convert to new table interface. Derive from
from OldTableInterfaceMixin for compatibility.
(AutoTransientTable.write_record): Removed. It's not implemented
yet and we still have to decide how to handle writing with the new
table and data framework.
* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests)
(TestTransientTable.test_transient_joined_table): Use the new
table interface
Revision
805 -
Directory Listing
Modified
Fri May 2 16:42:35 2003 UTC
(21 years, 10 months ago)
by
jan
Original Path:
trunk/thuban/test
(SimpleTable): Removed.
(TestTransientTable.test_transient_joined_table,
(TestTransientTable.test_transient_table_read_twice): Replaced
SimpleTable by MemoryTable.
Revision
785 -
Directory Listing
Modified
Wed Apr 30 10:54:03 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New
instance variable read_record_last_result
(TransientTableBase.read_record): Make sure reading the same
record twice works. The implementation uses the new instance
variable read_record_last_result
* test/test_transientdb.py
(TestTransientTable.test_transient_table_read_twice): New test
case for the above bug-fix.
Revision
775 -
Directory Listing
Modified
Tue Apr 29 14:34:57 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
SaveSessionTest.testSingleLayer): Add test for saving an invisible layer.
Revision
774 -
Directory Listing
Modified
Tue Apr 29 14:34:45 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Add new test data contents_test_visible.
(LoadSessionTest.setUp): save test data.
(LoadSessionTest.testLayerVisibility): Test if the visible flag
is loaded correctly.
Revision
765 -
Directory Listing
Modified
Tue Apr 29 12:42:14 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
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.
Revision
761 -
Directory Listing
Modified
Tue Apr 29 09:02:15 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestProjection.test): Test GetName() and GetAllParameters()
(TestProjFile.test): Remove tests for Set*() methods. Add tests for Replace().
Revision
755 -
Directory Listing
Modified
Fri Apr 25 14:48:35 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(SaveSessionTest.testLayerProjection): New test to verify layer projections
are saved correctly.
Revision
752 -
Directory Listing
Modified
Fri Apr 25 14:23:34 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestProjFile.test): Add tests for ProjFile.SetAllParameters,
ProjFile.SetProjection, ProjFile.SetName.
Revision
746 -
Directory Listing
Modified
Fri Apr 25 10:27:05 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(LoadSessionTest.testLayerProjection): New. Tests a file where a layer has
a projection.
Revision
742 -
Directory Listing
Modified
Fri Apr 25 09:14:41 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestProjFile.test): New. Tests the base ProjFile class.
Revision
723 -
Directory Listing
Modified
Thu Apr 24 15:31:53 2003 UTC
(21 years, 10 months ago)
by
bh
Original Path:
trunk/thuban/test
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
Revision
719 -
Directory Listing
Modified
Wed Apr 23 10:40:00 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Added test cases to handle nonexistent files, unreadable files, and
files that don't parse correctly.
Revision
714 -
Directory Listing
Modified
Wed Apr 23 08:47:05 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(TestProjection.test): New tests for GetParameter method.
Revision
698 -
Directory Listing
Modified
Wed Apr 16 16:40:18 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
New test cases for the projection file read and write functions.
Revision
692 -
Directory Listing
Modified
Wed Apr 16 14:10:10 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
changed the classification test data to include changing colors.
Revision
691 -
Directory Listing
Modified
Wed Apr 16 14:06:17 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
removed unnecessary extra <clnull> in the classification test data.
Revision
690 -
Directory Listing
Modified
Wed Apr 16 13:47:22 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Rework the classification test to test that we can load old files.
(testLabels): Test a file where the groups have labels.
Revision
684 -
Directory Listing
Modified
Tue Apr 15 21:55:12 2003 UTC
(21 years, 10 months ago)
by
jonathan
Original Path:
trunk/thuban/test
(testClassification): New. Loads the iceland_sample_test.thuban file and
checks if it was loaded correctly.
Revision
618 -
Directory Listing
Modified
Mon Apr 7 08:58:26 2003 UTC
(21 years, 11 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fix tests to use the renamed methods. Still need to write tests for the
new methods.
Revision
599 -
Directory Listing
Modified
Thu Apr 3 11:37:13 2003 UTC
(21 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
Use support.run_tests instead of
unittest.main so we get memory leak information
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
(TestLayer.test_point_layer, TestLayer.test_empty_layer)
(TestLayerLegend.test_visibility): Call the layer's Destroy method
to fix a memory leak.
Revision
598 -
Directory Listing
Modified
Thu Apr 3 11:37:10 2003 UTC
(21 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
Use support.run_tests instead of
unittest.main so we get memory leak information
(TestClassification.test_classification): Call the layer's Destroy
method to fix a memory leak.
Revision
596 -
Directory Listing
Modified
Thu Apr 3 11:37:01 2003 UTC
(21 years, 11 months ago)
by
bh
Original Path:
trunk/thuban/test
(print_garbage_information): New function that
prints information about still connected messages and memory
leaks.
(run_suite): Removed.
(run_tests): New function for use as a replacement of
unittest.main in the test_* files. This one calls
print_garbage_information at the end.
Revision
584 -
Directory Listing
Modified
Tue Apr 1 10:22:35 2003 UTC
(21 years, 11 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fix messages that are sent from maps and layers.
Revision
530 -
Directory Listing
Modified
Wed Mar 12 19:58:00 2003 UTC
(21 years, 11 months ago)
by
jonathan
Original Path:
trunk/thuban/test
Fixed problem with xml reading that caused exceptions
Revision
409 -
Directory Listing
Modified
Wed Feb 19 16:50:39 2003 UTC
(22 years ago)
by
jonathan
Original Path:
trunk/thuban/test
Updated the tests to use the new functions that are in the respective classes.
Revision
343 -
Directory Listing
Modified
Fri Oct 18 17:28:56 2002 UTC
(22 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestMapWithContents.test_projected_bounding_box): Use an explicit
epsilon.
Revision
342 -
Directory Listing
Modified
Fri Oct 18 17:28:46 2002 UTC
(22 years, 4 months ago)
by
bh
Original Path:
trunk/thuban/test
(FloatComparisonMixin.assertFloatEqual)
(FloatComparisonMixin.assertFloatSeqEqual): give a more useful
message if the assertion fails and don't return the return value
of self.assert_. In assertFloatSeqEqual the return meant that not
all items of the sequence were compared.
Revision
337 -
Directory Listing
Modified
Fri Sep 20 16:26:21 2002 UTC
(22 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestMapWithContents.test_tree_info): Create
the string with the bounding box on the fly because of platform
differences in the way %g is handled.
Revision
336 -
Directory Listing
Modified
Fri Sep 20 16:26:09 2002 UTC
(22 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(TestLayer.test_empty_layer): Create an empty
DBFfile too because Thuban layers can't yet cope missing DBF
files.
Revision
325 -
Directory Listing
Modified
Fri Sep 20 13:55:52 2002 UTC
(22 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
Use initthuban instead of
add_thuban_dir_to_path to initialize Thuban.
Revision
324 -
Directory Listing
Modified
Fri Sep 20 13:55:42 2002 UTC
(22 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
(FloatComparisonMixin.assertFloatEqual): New.
Mixin class for float comparisons
(SubscriberMixin): New. Mixin class to test messages sent through
the Connector class
Revision
323 -
Directory Listing
Modified
Fri Sep 20 13:44:00 2002 UTC
(22 years, 5 months ago)
by
bh
Original Path:
trunk/thuban/test
Fix a typo and add the -v flag to the command for
individual tests
Revision
292 -
Directory Listing
Added
Fri Aug 30 09:44:12 2002 UTC
(22 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test
Initial set of tests and
brief instructions on how to run them