Skip to content

Commit 4d3a3bb

Browse files
committed
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>
1 parent 0a7f269 commit 4d3a3bb

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

openstackclient/tests/unit/test_shell.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import importlib
1717
import os
18-
import sys
1918
from unittest import mock
2019

2120
from osc_lib.tests import utils as osc_lib_test_utils
@@ -412,32 +411,3 @@ def test_empty_env(self):
412411
"network_api_version": LIB_NETWORK_API_VERSION
413412
}
414413
self._assert_cli(flag, kwargs)
415-
416-
417-
class TestShellArgV(TestShell):
418-
"""Test the deferred help flag"""
419-
420-
def test_shell_argv(self):
421-
"""Test argv decoding
422-
423-
Python 2 does nothing with argv while Python 3 decodes it into
424-
Unicode before we ever see it. We manually decode when running
425-
under Python 2 so verify that we get the right argv types.
426-
427-
Use the argv supplied by the test runner so we get actual Python
428-
runtime behaviour; we only need to check the type of argv[0]
429-
which will always be present.
430-
"""
431-
432-
with mock.patch(
433-
self.shell_class_name + ".run",
434-
self.app,
435-
):
436-
# Ensure type gets through unmolested through shell.main()
437-
argv = sys.argv
438-
shell.main(sys.argv)
439-
self.assertEqual(type(argv[0]), type(self.app.call_args[0][0][0]))
440-
441-
# When shell.main() gets sys.argv itself it should be decoded
442-
shell.main()
443-
self.assertEqual(type(u'x'), type(self.app.call_args[0][0][0]))

0 commit comments

Comments
 (0)