mirror of
https://github.com/python/cpython
synced 2026-09-29 09:40:29 +03:00
Issue #15079: make a test applicable to both C and Python versions of the pickle module.
Patch by Stefan Mihaila.
This commit is contained in:
parent
b83719287d
commit
79035bd71f
2 changed files with 6 additions and 3 deletions
|
|
@ -707,6 +707,11 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
def test_getinitargs(self):
|
||||
pass
|
||||
|
||||
def test_pop_empty_stack(self):
|
||||
# Test issue7455
|
||||
s = b'0'
|
||||
self.assertRaises((pickle.UnpicklingError, IndexError), self.loads, s)
|
||||
|
||||
def test_metaclass(self):
|
||||
a = use_metaclass()
|
||||
for proto in protocols:
|
||||
|
|
@ -1383,9 +1388,6 @@ class AbstractPickleModuleTests(unittest.TestCase):
|
|||
# Test issue4298
|
||||
s = bytes([0x58, 0, 0, 0, 0x54])
|
||||
self.assertRaises(EOFError, pickle.loads, s)
|
||||
# Test issue7455
|
||||
s = b'0'
|
||||
self.assertRaises(pickle.UnpicklingError, pickle.loads, s)
|
||||
|
||||
|
||||
class AbstractPersistentPicklerTests(unittest.TestCase):
|
||||
|
|
|
|||
|
|
@ -630,6 +630,7 @@ Mike Meyer
|
|||
Steven Miale
|
||||
Trent Mick
|
||||
Stan Mihai
|
||||
Stefan Mihaila
|
||||
Aristotelis Mikropoulos
|
||||
Damien Miller
|
||||
Chad Miller
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue