diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-11-23 20:20:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-11-23 20:20:49 (GMT) |
commit | d5df19461d9e195f4f0063a0a63b816612f2fc4e (patch) | |
tree | cf77f2702366a5b60f6a7615c4fe2dcb7d4c833e | |
parent | 3062c9a6c87ff9b480d1eea960efbfc604e4b157 (diff) | |
download | cpython-d5df19461d9e195f4f0063a0a63b816612f2fc4e.zip cpython-d5df19461d9e195f4f0063a0a63b816612f2fc4e.tar.gz cpython-d5df19461d9e195f4f0063a0a63b816612f2fc4e.tar.bz2 |
test_pickle: speed up test_long
-rw-r--r-- | Lib/test/pickletester.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index cadc5a7..34e46f6 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -722,7 +722,11 @@ class AbstractPickleTests(unittest.TestCase): for n in nbase, -nbase: p = self.dumps(n, 2) got = self.loads(p) - self.assert_is_copy(n, got) + # assert_is_copy is very expensive here as it precomputes + # a failure message by computing the repr() of n and got, + # we just do the check ourselves. + self.assertIs(type(got), int) + self.assertEqual(n, got) def test_float(self): test_values = [0.0, 4.94e-324, 1e-310, 7e-308, 6.626e-34, 0.1, 0.5, |