Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-143672: convert the struct module to AC#143673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
skirpichev wants to merge9 commits intopython:mainfromskirpichev:struct-AC/143672
Closed
Show file tree
Hide file tree
Changes fromall 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 deletionsLib/test/test_inspect/test_inspect.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsLib/test/test_struct.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2026 Movatter.jp