add tests of error handling for wrong types of print() kwargs

This commit is contained in:
silmeth
2019-02-12 22:33:54 +01:00
parent 3d17cc0aa1
commit a2ab4473a3
2 changed files with 15 additions and 1 deletions

View File

@@ -1 +0,0 @@
print(2 + 3)

View File

@@ -0,0 +1,15 @@
print(2 + 3)
try:
print('test', end=4)
except TypeError:
pass
else:
assert False, "Expected TypeError on wrong type passed to end"
try:
print('test', sep=['a'])
except TypeError:
pass
else:
assert False, "Expected TypeError on wrong type passed to sep"