aboutsummaryrefslogtreecommitdiff
path: root/tests/TestConfigLoaders.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-26 14:38:25 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-26 14:38:25 -0500
commitbbb31f8213d61b7c91d8b17c543d12491dd2df1b (patch)
tree587be5cb3b64fb5797dc311ac082e3e7503635c2 /tests/TestConfigLoaders.py
parentb09a41f0891c041ad4fcecca59d03f52fe9ee9e8 (diff)
a bugfix in APL. Support and a unit test for behavior inheritance. It now happens automatically
when the config is loaded. Simply use Config.loadConfigFile(fileName) to leverage the functionality.
Diffstat (limited to 'tests/TestConfigLoaders.py')
-rw-r--r--tests/TestConfigLoaders.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/TestConfigLoaders.py b/tests/TestConfigLoaders.py
index 73b4987..17fc2d9 100644
--- a/tests/TestConfigLoaders.py
+++ b/tests/TestConfigLoaders.py
@@ -18,8 +18,14 @@ class TestConfigLoaders(unittest.TestCase):
result = Config.compositeXMLTrees(parent,overrider)
result = ElementTree(result)
- result.write('tests/testdata/compositeTEST.xml')
- assert filecmp.cmp('tests/testdata/compositeTEST.xml','tests/testdata/compositeTRUTH.xml')
+ 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')
+
+ result.write('tests/testdata/inheritanceTESTout.xml')
+ assert filecmp.cmp('tests/testdata/inheritanceTESTout.xml',\
+ 'tests/testdata/inheritanceTRUTH.xml')
if __name__ == '__main__':
unittest.main()