From 9123b67d641ba708a4ea3e5cd50665f0a73c6c8a Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 24 Sep 2020 12:03:30 +1000 Subject: tests/run-tests: Use -BS flags when running CPython. The use of -S ensures that only the CPython standard library is accessible, which makes tests run the same regardless of any site-packages that are installed. It also improves start-up time of CPython, reducing the overall time spent running the test suite. tests/basics/containment.py is updated to work around issue with old Python versions not being able to str-format a dict-keys object, which becomes apparent when -S is used. Signed-off-by: Damien George --- tests/basics/containment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/basics') diff --git a/tests/basics/containment.py b/tests/basics/containment.py index 4c94a9bae..24317ddd2 100644 --- a/tests/basics/containment.py +++ b/tests/basics/containment.py @@ -1,8 +1,8 @@ # sets, see set_containment for i in 1, 2: for o in {1:2}, {1:2}.keys(): - print("{} in {}: {}".format(i, o, i in o)) - print("{} not in {}: {}".format(i, o, i not in o)) + print("{} in {}: {}".format(i, str(o), i in o)) + print("{} not in {}: {}".format(i, str(o), i not in o)) haystack = "supercalifragilistc" for needle in [haystack[i:] for i in range(len(haystack))]: -- cgit v1.2.3