The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.

Repaired that, and added appropriate tests for it to test_struct.py.
This commit is contained in:
Tim Peters 2001-06-13 01:26:35 +00:00
parent d1a7da6c0d
commit da9c5b35a3
2 changed files with 14 additions and 0 deletions

View file

@ -314,4 +314,10 @@ def test_std_qQ():
pass
test_one_qQ(x)
# Some error cases.
for direction in "<>":
for letter in "qQ":
for badobject in "a string", 3+42j, randrange:
any_err(struct.pack, direction + letter, badobject)
test_std_qQ()