diff options
author | Guido van Rossum <guido@python.org> | 2007-07-20 00:22:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-20 00:22:32 (GMT) |
commit | 99603b0c1edb4b8ca2a30fa90470170b959321ee (patch) | |
tree | f0fef33a9c03529354c01f5fd374fd36ebc024d7 /Lib/test/test_bool.py | |
parent | be6fe5476cc3233ac20e02c0063355a5884663f7 (diff) | |
download | cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.zip cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.tar.gz cpython-99603b0c1edb4b8ca2a30fa90470170b959321ee.tar.bz2 |
Getting rid of cPickle. Mmm, feels good!
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r-- | Lib/test/test_bool.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index 8006370..7a9022e 100644 --- a/Lib/test/test_bool.py +++ b/Lib/test/test_bool.py @@ -268,34 +268,6 @@ class BoolTest(unittest.TestCase): self.assertIs(pickle.loads(pickle.dumps(True, True)), True) self.assertIs(pickle.loads(pickle.dumps(False, True)), False) - def test_cpickle(self): - try: - import cPickle - except ImportError: - return # Just ignore this if cPickle doesn't exist - - self.assertIs(cPickle.loads(cPickle.dumps(True)), True) - self.assertIs(cPickle.loads(cPickle.dumps(False)), False) - self.assertIs(cPickle.loads(cPickle.dumps(True, True)), True) - self.assertIs(cPickle.loads(cPickle.dumps(False, True)), False) - - def test_mixedpickle(self): - import pickle - try: - import cPickle - except ImportError: - return # Just ignore this if cPickle doesn't exist - - self.assertIs(pickle.loads(cPickle.dumps(True)), True) - self.assertIs(pickle.loads(cPickle.dumps(False)), False) - self.assertIs(pickle.loads(cPickle.dumps(True, True)), True) - self.assertIs(pickle.loads(cPickle.dumps(False, True)), False) - - self.assertIs(cPickle.loads(pickle.dumps(True)), True) - self.assertIs(cPickle.loads(pickle.dumps(False)), False) - self.assertIs(cPickle.loads(pickle.dumps(True, True)), True) - self.assertIs(cPickle.loads(pickle.dumps(False, True)), False) - def test_picklevalues(self): # Test for specific backwards-compatible pickle values import pickle @@ -306,19 +278,6 @@ class BoolTest(unittest.TestCase): self.assertEqual(pickle.dumps(True, protocol=2), b'\x80\x02\x88.') self.assertEqual(pickle.dumps(False, protocol=2), b'\x80\x02\x89.') - def test_cpicklevalues(self): - # Test for specific backwards-compatible pickle values - try: - import cPickle - except ImportError: - return # Just ignore the rest if cPickle doesn't exist - self.assertEqual(cPickle.dumps(True, protocol=0), b"I01\n.") - self.assertEqual(cPickle.dumps(False, protocol=0), b"I00\n.") - self.assertEqual(cPickle.dumps(True, protocol=1), b"I01\n.") - self.assertEqual(cPickle.dumps(False, protocol=1), b"I00\n.") - self.assertEqual(cPickle.dumps(True, protocol=2), b'\x80\x02\x88.') - self.assertEqual(cPickle.dumps(False, protocol=2), b'\x80\x02\x89.') - def test_convert_to_bool(self): # Verify that TypeError occurs when bad things are returned # from __bool__(). This isn't really a bool test, but |