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

Method test_badly_quoted_string

Lib/test/pickletester.py:1215–1231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1213 self.check_unpickling_error(ValueError, b"S'\\'\n.")
1214
1215 def test_badly_quoted_string(self):
1216 # Issue #17710
1217 badpickles = [b"S'\n.",
1218 b'S"\n.',
1219 b'S\' \n.',
1220 b'S" \n.',
1221 b'S\'"\n.',
1222 b'S"\'\n.',
1223 b"S' ' \n.",
1224 b'S" " \n.',
1225 b"S ''\n.",
1226 b'S ""\n.',
1227 b'S \n.',
1228 b'S\n.',
1229 b'S.']
1230 for p in badpickles:
1231 self.check_unpickling_error(pickle.UnpicklingError, p)
1232
1233 def test_correctly_quoted_string(self):
1234 goodpickles = [(b"S''\n.", ''),

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected