diff options
author | rcoh <rcoh@mit.edu> | 2011-01-27 16:50:59 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-27 16:50:59 -0500 |
commit | 5fb3ea060025241105dc8e9a174513c112f9a133 (patch) | |
tree | e98b1b3eab0b05b0e518b08cbab086d224fd9250 /tests | |
parent | 5d29906fff79bc6e4ba83be7028e1380a0014d21 (diff) |
A metric $#%$-ton of changes. Added doc-strings to EVERYTHING. Phew. Fixed a massive bug that
increases performance in by up to a factor of 60. A bunch of new behaviors for the class.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestComponentRegistry.py | 3 | ||||
-rw-r--r-- | tests/TestConfigLoaders.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/TestComponentRegistry.py b/tests/TestComponentRegistry.py index 5ada524..9de1a32 100644 --- a/tests/TestComponentRegistry.py +++ b/tests/TestComponentRegistry.py @@ -4,13 +4,16 @@ from operationscore.SmootCoreObject import SmootCoreObject class TestComponentRegistry(unittest.TestCase): def setUp(self): compReg.initRegistry() + def tearDown(self): compReg.clearRegistry() + def test_register_component_id_specified(self): comp = SmootCoreObject({'Id': 'obj1'}) compReg.registerComponent(comp) newcomp = compReg.getComponent('obj1') assert comp == newcomp + def test_register_new_id(self): comp = SmootCoreObject({}) cid =compReg.registerComponent(comp) diff --git a/tests/TestConfigLoaders.py b/tests/TestConfigLoaders.py index 17fc2d9..c79bbf1 100644 --- a/tests/TestConfigLoaders.py +++ b/tests/TestConfigLoaders.py @@ -7,8 +7,10 @@ import xml class TestConfigLoaders(unittest.TestCase): def setUp(self): pass + def tearDown(self): pass + def test_composite(self): parent = ElementTree() overrider = ElementTree() @@ -20,6 +22,7 @@ class TestConfigLoaders(unittest.TestCase): result = ElementTree(result) result.write('tests/testdata/compositeTESTout.xml') assert filecmp.cmp('tests/testdata/compositeTESTout.xml','tests/testdata/compositeTRUTH.xml') + def test_inheritance(self): result = Config.loadConfigFile('tests/testdata/inheritanceTEST.xml') |