Skip to content

Commit a2ab447

Browse files
committed
add tests of error handling for wrong types of print() kwargs
1 parent 3d17cc0 commit a2ab447

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

tests/snippets/print_const.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/snippets/printing.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
print(2 + 3)
2+
3+
try:
4+
print('test', end=4)
5+
except TypeError:
6+
pass
7+
else:
8+
assert False, "Expected TypeError on wrong type passed to end"
9+
10+
try:
11+
print('test', sep=['a'])
12+
except TypeError:
13+
pass
14+
else:
15+
assert False, "Expected TypeError on wrong type passed to sep"

0 commit comments

Comments
 (0)