Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make the tests more realistic
  • Loading branch information
orenmn committed Oct 13, 2017
commit f8a43d1878366264a57ccbf160f8dfd9cb8915d9
6 changes: 3 additions & 3 deletions Lib/test/test_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@ def test_uninitialized(self):
# methods or accessing attributes of an uninitialized Struct object.
s = struct.Struct.__new__(struct.Struct)
self.assertRaises(ValueError, s.iter_unpack, b'foo')
self.assertRaises(ValueError, s.pack)
self.assertRaises(ValueError, s.pack_into)
self.assertRaises(ValueError, s.pack, 42)
self.assertRaises(ValueError, s.pack_into, bytearray(1), 0, 42)
self.assertRaises(ValueError, s.unpack, b'bar')
self.assertRaises(ValueError, s.unpack_from, b'spam')
self.assertRaises(ValueError, s.unpack_from, b'spam', 0)
self.assertRaises(ValueError, s.__sizeof__)
with self.assertRaises(ValueError):
s.format
Expand Down