mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
add tests of error handling for wrong types of print() kwargs
This commit is contained in:
@@ -1 +0,0 @@
|
||||
print(2 + 3)
|
||||
15
tests/snippets/printing.py
Normal file
15
tests/snippets/printing.py
Normal 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"
|
||||
Reference in New Issue
Block a user