Skip to content

Commit beb474c

Browse files
committed
[GR-36912] StructBuiltins: pack fix arity.
PullRequest: graalpython/2144
2 parents 9d7e43b + 7a28995 commit beb474c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_struct.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -259,3 +259,13 @@ def test_iter_unpack():
259259
assert lh(it) == 0
260260
assert_raises(StopIteration, next, it)
261261
assert lh(it) == 0
262+
263+
264+
# def test_pack_varargs():
265+
# assert struct.Struct(">B").pack(3) == b'\x03'
266+
# raised = False
267+
# try:
268+
# struct.Struct(">B").pack(3, kw=1)
269+
# except TypeError:
270+
# raised = True
271+
# assert raised

0 commit comments

Comments
 (0)