File tree Expand file tree Collapse file tree
openstackclient/tests/unit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616import importlib
1717import os
18- import sys
1918from unittest import mock
2019
2120from 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 ]))
You can’t perform that action at this time.
0 commit comments