From a2ab4473a398f1d3fda785e2c8c18bb7730ea404 Mon Sep 17 00:00:00 2001 From: silmeth Date: Tue, 12 Feb 2019 22:33:54 +0100 Subject: [PATCH] add tests of error handling for wrong types of print() kwargs --- tests/snippets/print_const.py | 1 - tests/snippets/printing.py | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) delete mode 100644 tests/snippets/print_const.py create mode 100644 tests/snippets/printing.py diff --git a/tests/snippets/print_const.py b/tests/snippets/print_const.py deleted file mode 100644 index 816fea865..000000000 --- a/tests/snippets/print_const.py +++ /dev/null @@ -1 +0,0 @@ -print(2 + 3) diff --git a/tests/snippets/printing.py b/tests/snippets/printing.py new file mode 100644 index 000000000..3ab646fff --- /dev/null +++ b/tests/snippets/printing.py @@ -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"