From 1ff6011abc47cb3a42ed89c9c682ac8a0af6b092 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 7 Apr 2014 05:00:03 +0100 Subject: Modify set tests to print sorted sets directly instead of creating temporary lists and sorting those in-place --- tests/basics/set_update.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests/basics/set_update.py') diff --git a/tests/basics/set_update.py b/tests/basics/set_update.py index 78cd76356..5e4e2a8a7 100644 --- a/tests/basics/set_update.py +++ b/tests/basics/set_update.py @@ -1,12 +1,7 @@ -def report(s): - l = list(s) - l.sort() - print(l) - s = {1} s.update() -report(s) +print(s) s.update([2]) -report(s) +print(sorted(s)) s.update([1,3], [2,2,4]) -report(s) +print(sorted(s)) -- cgit v1.2.3