diff options
author | dengzhaosen <dengzhaosen@inspur.com> | 2021-04-25 16:06:29 +0800 |
---|---|---|
committer | dengzhaosen <dengzhaosen@inspur.com> | 2021-04-25 16:06:39 +0800 |
commit | 934fba53e48ce15986fc450c7cd70c3de53daf31 (patch) | |
tree | 547ca447f8b97524cbc45eae6c4aed64a5060474 | |
parent | 758775c07bc66db3ee6602ecaec53173e89c5acb (diff) | |
download | oslo-config-934fba53e48ce15986fc450c7cd70c3de53daf31.tar.gz |
Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops.
Change-Id: I668c1bddba29a5e823734b1cad5116ba2fdb5f75
-rw-r--r-- | oslo_config/tests/test_cfg.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py index 0686eca..4c3db7e 100644 --- a/oslo_config/tests/test_cfg.py +++ b/oslo_config/tests/test_cfg.py @@ -821,12 +821,7 @@ class CliSpecialOptsTestCase(BaseTestCase): self.assertIn('[--config-file PATH]', sys.stdout.getvalue()) def test_version(self): - # In Python 3.4+, argparse prints the version on stdout; before 3.4, it - # printed it on stderr. - if sys.version_info >= (3, 4): - stream_name = 'stdout' - else: - stream_name = 'stderr' + stream_name = 'stdout' self.useFixture(fixtures.MonkeyPatch("sys.%s" % stream_name, io.StringIO())) self.assertRaises(SystemExit, self.conf, ['--version']) |