Changeset 2264
- Timestamp:
- 03/06/08 11:54:12 (2 months ago)
- Files:
-
- gaphor/trunk/gaphor/UML/tests/test_elementfactory.py (modified) (1 diff)
- gaphor/trunk/gaphor/diagram/states/transition.py (modified) (1 diff)
- gaphor/trunk/gaphor/diagram/tests/test_activitynodes.py (modified) (1 diff)
- gaphor/trunk/gaphor/storage/tests/test_storage.py (modified) (1 diff)
- gaphor/trunk/gaphor/ui/tests/test_diagramtoolbox.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/gaphor/UML/tests/test_elementfactory.py
r2219 r2264 122 122 events.append(event) 123 123 124 #Application.init_components() 124 125 Application.register_handler(handler) 125 126 gaphor/trunk/gaphor/diagram/states/transition.py
r2254 r2264 40 40 if not self.subject: 41 41 return 42 element = event .element42 element = event and event.element 43 43 guard = self.subject.guard 44 44 if event is None or \ gaphor/trunk/gaphor/diagram/tests/test_activitynodes.py
r2046 r2264 4 4 5 5 class ActivityNodesTestCase(TestCase): 6 6 7 def test_decision_node(self): 7 8 """Test creation of decision node gaphor/trunk/gaphor/storage/tests/test_storage.py
r2150 r2264 15 15 from cStringIO import StringIO 16 16 17 __module__ = 'test_storage'17 #__module__ = 'test_storage' 18 18 19 19 class PseudoFile(object): gaphor/trunk/gaphor/ui/tests/test_diagramtoolbox.py
r1301 r2264 1 1 2 2 import gtk 3 import unittest 4 3 from gaphor.tests.testcase import TestCase 5 4 from gaphor.application import Application 6 5 from gaphor.ui.diagramtab import DiagramTab … … 8 7 from gaphor import UML 9 8 10 class DiagramToolboxTestCase(unittest.TestCase): 9 class WindowOwner(object): 10 """ 11 Placeholder object for a MainWindow. Should provide just enough 12 methods to make the tests work. 13 """ 14 15 def remove_tab(self, other): 16 pass 17 18 19 class DiagramToolboxTestCase(TestCase): 20 21 services = ['element_factory', 'properties'] 11 22 12 23 def setUp(self): 13 Application.init(services=['element_factory', 'properties'])14 diagram = UML.Diagram()15 tab = DiagramTab( None)24 TestCase.setUp(self) 25 diagram = self.diagram 26 tab = DiagramTab(WindowOwner()) 16 27 tab.diagram = diagram 17 28 tab.construct() … … 19 30 20 31 def tearDown(self): 21 Application.shutdown()32 TestCase.tearDown(self) 22 33 23 34 def test_standalone_construct_with_diagram(self): … … 29 40 # Ensure the factory is working 30 41 self.tab.view.tool._factory() 42 self.diagram.canvas.update() 31 43 32 44 def test_placement_pointer(self):
