Mercurial > hg > configuration
comparison tests/unit.py @ 25:b39e550402ea
we now update configuration correctly
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 26 Mar 2012 15:55:05 -0700 |
parents | 39f2611db9be |
children | c516ab813079 |
comparison
equal
deleted
inserted
replaced
24:39f2611db9be | 25:b39e550402ea |
---|---|
18 def test_cli(self): | 18 def test_cli(self): |
19 example = ExampleConfiguration() | 19 example = ExampleConfiguration() |
20 | 20 |
21 # parse command line arguments | 21 # parse command line arguments |
22 options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox']) | 22 options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox']) |
23 | |
24 # ensure that the options appropriately get set | |
23 self.assertEqual(bool(args), False) # no arguments | 25 self.assertEqual(bool(args), False) # no arguments |
24 self.assertEqual(options.develop, True) | 26 self.assertEqual(options.develop, True) |
25 self.assertEqual(options.activeTests, 'ts') | 27 self.assertEqual(options.activeTests, ['ts']) |
28 self.assertEqual(options.browser_path, '/home/jhammel/bin/firefox') | |
29 | |
30 # ensure that the configuration appropriately gets updated | |
31 self.assertEqual(example.config['develop'], True) | |
32 self.assertEqual(example.config['activeTests'], ['ts']) | |
33 self.assertEqual(example.config['browser_path'], '/home/jhammel/bin/firefox') | |
26 | 34 |
27 if __name__ == '__main__': | 35 if __name__ == '__main__': |
28 unittest.main() | 36 unittest.main() |
29 | 37 |