Mercurial > hg > configuration
comparison tests/unit.py @ 28:c516ab813079
begin stubbing serialization/deserialization
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 26 Mar 2012 16:54:37 -0700 |
parents | b39e550402ea |
children | b27a7cb2dd5b |
comparison
equal
deleted
inserted
replaced
27:c6d966431498 | 28:c516ab813079 |
---|---|
14 here = os.path.dirname(os.path.abspath(__file__)) | 14 here = os.path.dirname(os.path.abspath(__file__)) |
15 | 15 |
16 class ConfigurationUnitTest(unittest.TestCase): | 16 class ConfigurationUnitTest(unittest.TestCase): |
17 | 17 |
18 def test_cli(self): | 18 def test_cli(self): |
19 """test command line interface""" | |
20 | |
19 example = ExampleConfiguration() | 21 example = ExampleConfiguration() |
20 | 22 |
21 # parse command line arguments | 23 # parse command line arguments |
22 options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox']) | 24 options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox']) |
23 | 25 |
30 # ensure that the configuration appropriately gets updated | 32 # ensure that the configuration appropriately gets updated |
31 self.assertEqual(example.config['develop'], True) | 33 self.assertEqual(example.config['develop'], True) |
32 self.assertEqual(example.config['activeTests'], ['ts']) | 34 self.assertEqual(example.config['activeTests'], ['ts']) |
33 self.assertEqual(example.config['browser_path'], '/home/jhammel/bin/firefox') | 35 self.assertEqual(example.config['browser_path'], '/home/jhammel/bin/firefox') |
34 | 36 |
37 def test_configuration_providers(self): | |
38 """test file-based configuration providers""" | |
39 | |
35 if __name__ == '__main__': | 40 if __name__ == '__main__': |
36 unittest.main() | 41 unittest.main() |
37 | 42 |