Remove unnecessary test
As noted, we're simply testing the default behavior of Python 3 in this test. Remove it, now that this is the only version(s) of Python 3 we have to worry about. Change-Id: I5f07343df8334457d907086033d5685f59c0bf0e Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
0a7f2692c6
commit
4d3a3bb28f
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
from osc_lib.tests import utils as osc_lib_test_utils
|
from osc_lib.tests import utils as osc_lib_test_utils
|
||||||
@ -412,32 +411,3 @@ class TestShellCli(TestShell):
|
|||||||
"network_api_version": LIB_NETWORK_API_VERSION
|
"network_api_version": LIB_NETWORK_API_VERSION
|
||||||
}
|
}
|
||||||
self._assert_cli(flag, kwargs)
|
self._assert_cli(flag, kwargs)
|
||||||
|
|
||||||
|
|
||||||
class TestShellArgV(TestShell):
|
|
||||||
"""Test the deferred help flag"""
|
|
||||||
|
|
||||||
def test_shell_argv(self):
|
|
||||||
"""Test argv decoding
|
|
||||||
|
|
||||||
Python 2 does nothing with argv while Python 3 decodes it into
|
|
||||||
Unicode before we ever see it. We manually decode when running
|
|
||||||
under Python 2 so verify that we get the right argv types.
|
|
||||||
|
|
||||||
Use the argv supplied by the test runner so we get actual Python
|
|
||||||
runtime behaviour; we only need to check the type of argv[0]
|
|
||||||
which will always be present.
|
|
||||||
"""
|
|
||||||
|
|
||||||
with mock.patch(
|
|
||||||
self.shell_class_name + ".run",
|
|
||||||
self.app,
|
|
||||||
):
|
|
||||||
# Ensure type gets through unmolested through shell.main()
|
|
||||||
argv = sys.argv
|
|
||||||
shell.main(sys.argv)
|
|
||||||
self.assertEqual(type(argv[0]), type(self.app.call_args[0][0][0]))
|
|
||||||
|
|
||||||
# When shell.main() gets sys.argv itself it should be decoded
|
|
||||||
shell.main()
|
|
||||||
self.assertEqual(type(u'x'), type(self.app.call_args[0][0][0]))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user