summaryrefslogtreecommitdiffstats
path: root/Lib/test/output
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-09-15 15:14:51 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-09-15 15:14:51 (GMT)
commitbe467e5c69515c355982e41d90762a31f2d3f75b (patch)
tree82e62b2aa1d370258dd72c41fcce76835e5180f4 /Lib/test/output
parenta647f577f00647063f1e29be75b2b3b8207fc3d0 (diff)
downloadcpython-be467e5c69515c355982e41d90762a31f2d3f75b.zip
cpython-be467e5c69515c355982e41d90762a31f2d3f75b.tar.gz
cpython-be467e5c69515c355982e41d90762a31f2d3f75b.tar.bz2
Fix Bug #114293:
Strings are unpickled by calling eval on the string's repr. This change makes pickle work like cPickle; it checks if the pickled string is safe to eval and raises ValueError if it is not. test suite modifications: Verify that pickle catches a variety of insecure string pickles Make test_pickle and test_cpickle use exactly the same test suite Add test for pickling recursive object
Diffstat (limited to 'Lib/test/output')
-rw-r--r--Lib/test/output/test_cpickle14
-rw-r--r--Lib/test/output/test_pickle2
2 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/output/test_cpickle b/Lib/test/output/test_cpickle
index 4f78690..696288a 100644
--- a/Lib/test/output/test_cpickle
+++ b/Lib/test/output/test_cpickle
@@ -9,3 +9,17 @@ loads() binary
ok
loads() BINDATA
ok
+dumps() RECURSIVE
+ok
+dumps()
+loads()
+ok
+loads() DATA
+ok
+dumps() binary
+loads() binary
+ok
+loads() BINDATA
+ok
+dumps() RECURSIVE
+ok
diff --git a/Lib/test/output/test_pickle b/Lib/test/output/test_pickle
index 78a80a9..4b054b7 100644
--- a/Lib/test/output/test_pickle
+++ b/Lib/test/output/test_pickle
@@ -9,3 +9,5 @@ loads() binary
ok
loads() BINDATA
ok
+dumps() RECURSIVE
+ok