MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unknown_flag

Method test_unknown_flag

Lib/test/test_pickle.py:873–879  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

871
872 @support.force_not_colorized
873 def test_unknown_flag(self):
874 stderr = io.StringIO()
875 with self.assertRaises(SystemExit):
876 # check that the parser help is shown
877 with contextlib.redirect_stderr(stderr):
878 _ = self.invoke_pickle('--unknown')
879 self.assertStartsWith(stderr.getvalue(), 'usage: ')
880
881
882def load_tests(loader, tests, pattern):

Callers

nothing calls this directly

Calls 4

invoke_pickleMethod · 0.95
getvalueMethod · 0.95
assertRaisesMethod · 0.45
assertStartsWithMethod · 0.45

Tested by

no test coverage detected