diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2012-11-12 16:25:55 -0500 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-11-15 14:59:41 -0500 |
| commit | ac180b95d1867c4b4daf9729e97ce93f3201d178 (patch) | |
| tree | a451fc42f8e1aca149f7b213bc40a0cf5db17b83 /tests | |
| parent | 0787e38090d309c2c1272886c6ea029a9f8e4924 (diff) | |
Use stock argparse --version behaviour
optparse prints the version to stdout, argparse prints the version to
stderr.
There's no need to preserve the old optparse behaviour, let's just stick
with argparse behaviour.
Change-Id: Ie141c72112a63149d098afa9db55a95a309e79d7
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_cfg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test_cfg.py b/tests/unit/test_cfg.py index 48732d5..d4559d0 100644 --- a/tests/unit/test_cfg.py +++ b/tests/unit/test_cfg.py @@ -255,9 +255,9 @@ class CliOptsTestCase(BaseTestCase): self.assertTrue('--config-file' in sys.stdout.getvalue()) def test_version(self): - self.stubs.Set(sys, 'stdout', StringIO.StringIO()) + self.stubs.Set(sys, 'stderr', StringIO.StringIO()) self.assertRaises(SystemExit, self.conf, ['--version']) - self.assertTrue('1.0' in sys.stdout.getvalue()) + self.assertTrue('1.0' in sys.stderr.getvalue()) def test_config_file(self): paths = self.create_tempfiles([('1', '[DEFAULT]'), |
