mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #23738: Document and test actual keyword parameter names
Also fix signature because os.utime(..., ns=None) is not allowed.
This commit is contained in:
parent
5558d4f2f8
commit
bf19d16950
9 changed files with 73 additions and 31 deletions
|
@ -179,6 +179,8 @@ class BinASCIITest(unittest.TestCase):
|
|||
self.assertEqual(binascii.unhexlify(self.type2test(t)), u)
|
||||
|
||||
def test_qp(self):
|
||||
binascii.a2b_qp(data=b"", header=False) # Keyword arguments allowed
|
||||
|
||||
# A test for SF bug 534347 (segfaults without the proper fix)
|
||||
try:
|
||||
binascii.a2b_qp(b"", **{1:1})
|
||||
|
@ -186,6 +188,7 @@ class BinASCIITest(unittest.TestCase):
|
|||
pass
|
||||
else:
|
||||
self.fail("binascii.a2b_qp(**{1:1}) didn't raise TypeError")
|
||||
|
||||
self.assertEqual(binascii.a2b_qp(b"= "), b"= ")
|
||||
self.assertEqual(binascii.a2b_qp(b"=="), b"=")
|
||||
self.assertEqual(binascii.a2b_qp(b"=AX"), b"=AX")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue