Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6266,6 +6266,10 @@ def test_stat_module_has_signatures(self):
import stat
self._test_module_has_signatures(stat)

def test_struct_module_has_signatures(self):
import struct
self._test_module_has_signatures(struct)

def test_string_module_has_signatures(self):
import string
self._test_module_has_signatures(string)
Expand Down
6 changes: 6 additions & 0 deletions Lib/test/test_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ def test_pack_into(self):
self.assertRaises((TypeError, struct.error), struct.pack_into, b'', sb,
None)

# Just a wrong buf.
self.assertRaises(TypeError, s.pack_into, "ЫЫЫ", 0, b'gravitsappa')

def test_pack_into_fn(self):
test_string = b'Reykjavik rocks, eow!'
writable_buf = array.array('b', b' '*100)
Expand All @@ -484,6 +487,9 @@ def test_pack_into_fn(self):
self.assertRaises((ValueError, struct.error), pack_into, small_buf, 2,
test_string)

# Just a wrong buf.
self.assertRaises(TypeError, pack_into, "ЫЫЫ", 0, b'pepelats')

def test_unpack_with_buffer(self):
# SF bug 1563759: struct.unpack doesn't support buffer protocol objects
data1 = array.array('B', b'\x12\x34\x56\x78')
Expand Down
Loading
Loading