/[thuban]/branches/WIP-pyshapelib-bramz/test/test_session.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/test/test_session.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 17356 byte(s)
Diff to previous 1676 , to selected 984
made a copy

Revision 1676 - (view) (annotate) - [select for diffs]
Modified Thu Aug 28 13:14:44 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 17356 byte(s)
Diff to previous 1401 , to selected 984
(UnreferencedTablesTests.tearDown): Make
sure that the session is destroyed properly


Revision 1401 - (view) (annotate) - [select for diffs]
Modified Thu Jul 10 14:56:25 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 17312 byte(s)
Diff to previous 1266 , to selected 984
(TestSessionWithContent.test_forward_map_projection):
        MAP_PROJECTION_CHANGED events send the old projection.


Revision 1266 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 14:36:35 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 17306 byte(s)
Diff to previous 1125 , to selected 984
(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 1125 - (view) (annotate) - [select for diffs]
Modified Mon Jun 2 14:14:32 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 17366 byte(s)
Diff to previous 1068 , to selected 984
(TestSessionSimple.test_add_table): Test
whether the modified flag is set properly


Revision 1068 - (view) (annotate) - [select for diffs]
Modified Tue May 27 15:02:37 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 17114 byte(s)
Diff to previous 1039 , to selected 984
* 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 1039 - (view) (annotate) - [select for diffs]
Modified Mon May 26 17:31:24 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 13286 byte(s)
Diff to previous 1016 , to selected 984
(TestSessionSimple.test_open_table_file):
New. test case for OpenTableFile


Revision 1016 - (view) (annotate) - [select for diffs]
Modified Fri May 23 11:05:59 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 12941 byte(s)
Diff to previous 987 , to selected 984
* Thuban/Model/session.py (Session.AddShapeStore): Define
AddShapeStore analogously to AddTable.

* test/test_session.py (TestSessionSimple.test_add_shapestore):
New. Test for AddShapeStore


Revision 987 - (view) (annotate) - [select for diffs]
Modified Thu May 22 16:46:14 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 12356 byte(s)
Diff to previous 984
* 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 - (view) (annotate) - [selected]
Modified Thu May 22 16:37:48 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 11474 byte(s)
Diff to previous 982
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 - (view) (annotate) - [select for diffs]
Modified Thu May 22 12:02:15 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 10450 byte(s)
Diff to previous 851 , to selected 984
* 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 851 - (view) (annotate) - [select for diffs]
Modified Wed May 7 15:11:12 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 9612 byte(s)
Diff to previous 723 , to selected 984
* 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 723 - (view) (annotate) - [select for diffs]
Modified Thu Apr 24 15:31:53 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 7912 byte(s)
Diff to previous 584 , to selected 984
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 584 - (view) (annotate) - [select for diffs]
Modified Tue Apr 1 10:22:35 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 7682 byte(s)
Diff to previous 482 , to selected 984
Fix messages that are sent from maps and layers.


Revision 482 - (view) (annotate) - [select for diffs]
Modified Thu Mar 6 16:47:02 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 7615 byte(s)
Diff to previous 409 , to selected 984
Fixed and added tests for the classification classes.


Revision 409 - (view) (annotate) - [select for diffs]
Modified Wed Feb 19 16:50:39 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 7616 byte(s)
Diff to previous 395 , to selected 984
Updated the tests to use the new functions that are in the respective classes.


Revision 395 - (view) (annotate) - [select for diffs]
Modified Mon Feb 10 15:28:02 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/test/test_session.py
File length: 7582 byte(s)
Diff to previous 334 , to selected 984
fix tests to work with new code changes.


Revision 334 - (view) (annotate) - [select for diffs]
Added Fri Sep 20 15:51:17 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/test/test_session.py
File length: 7494 byte(s)
Diff to selected 984
New. Test cases for Thuban.Model.session


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26