summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/set_update.py
diff options
context:
space:
mode:
authorAndrew Scheller <github@loowis.durge.org>2014-04-07 05:00:03 +0100
committerAndrew Scheller <github@loowis.durge.org>2014-04-07 05:00:03 +0100
commit1ff6011abc47cb3a42ed89c9c682ac8a0af6b092 (patch)
tree24af0b18cf1602f7a9292e39644f0f70d8c647ac /tests/basics/set_update.py
parent2bfd2dc77091bee94723c36216dee652bcc8a054 (diff)
downloadmicropython-1ff6011abc47cb3a42ed89c9c682ac8a0af6b092.tar.gz
micropython-1ff6011abc47cb3a42ed89c9c682ac8a0af6b092.zip
Modify set tests to print sorted sets directly
instead of creating temporary lists and sorting those in-place
Diffstat (limited to 'tests/basics/set_update.py')
-rw-r--r--tests/basics/set_update.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/basics/set_update.py b/tests/basics/set_update.py
index 78cd763560..5e4e2a8a74 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))