MCPcopy Index your code
hub / github.com/python/cpython / test_unknown_flag

Method test_unknown_flag

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

Source from the content-addressed store, hash-verified

800
801 @support.force_not_colorized
802 def test_unknown_flag(self):
803 stderr = io.StringIO()
804 with self.assertRaises(SystemExit):
805 # check that the parser help is shown
806 with contextlib.redirect_stderr(stderr):
807 _ = self.invoke_pickle('--unknown')
808 self.assertStartsWith(stderr.getvalue(), 'usage: ')
809
810
811def load_tests(loader, tests, pattern):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected