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

Method test_invocation

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

Source from the content-addressed store, hash-verified

780 return self.text_normalize(output.getvalue())
781
782 def test_invocation(self):
783 # test 'python -m pickle pickle_file'
784 data = {
785 'a': [1, 2.0, 3+4j],
786 'b': ('character string', b'byte string'),
787 'c': 'string'
788 }
789 expect = '''
790 {'a': [1, 2.0, (3+4j)],
791 'b': ('character string', b'byte string'),
792 'c': 'string'}
793 '''
794 self.set_pickle_data(data)
795
796 with self.subTest(data=data):
797 res = self.invoke_pickle()
798 expect = self.text_normalize(expect)
799 self.assertListEqual(res.splitlines(), expect.splitlines())
800
801 @support.force_not_colorized
802 def test_unknown_flag(self):

Callers

nothing calls this directly

Calls 6

set_pickle_dataMethod · 0.95
invoke_pickleMethod · 0.95
text_normalizeMethod · 0.95
assertListEqualMethod · 0.80
subTestMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected