From 8c3858b01623f9527b57b13c44ff97c67bafb00b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 19 Jan 2014 18:41:55 +0200 Subject: Move tests in basic/tests/ up one level preparating to multiple test dirs. --- tests/basics/true-value.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/basics/true-value.py (limited to 'tests/basics/true-value.py') diff --git a/tests/basics/true-value.py b/tests/basics/true-value.py new file mode 100644 index 0000000000..6ba410ddc2 --- /dev/null +++ b/tests/basics/true-value.py @@ -0,0 +1,27 @@ +# Test true-ish value handling + +if not False: + print("False") + +if not 0: + print("0") + +if not "": + print("Empty string") +if "foo": + print("Non-empty string") + +if not (): + print("Empty tuple") +if ("",): + print("Non-empty tuple") + +if not []: + print("Empty list") +if [0]: + print("Non-empty list") + +if not {}: + print("Empty dict") +if {0:0}: + print("Non-empty dict") -- cgit v1.2.3