diff options
author | Damien George <damien.p.george@gmail.com> | 2015-03-12 22:47:44 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-12 22:48:45 +0000 |
commit | af43565322f5c45a1a92df1afceff24c93021998 (patch) | |
tree | 0334982a350b9201b8e0b256dc7c04dff8b3ea77 /tests/basics/seq_unpack.py | |
parent | 848dd0e7620b086f984fc6254afc8202d5448a77 (diff) | |
download | micropython-af43565322f5c45a1a92df1afceff24c93021998.tar.gz micropython-af43565322f5c45a1a92df1afceff24c93021998.zip |
tests: Add tests for things that are not already tested.
The aim here is to improve coverage of the code.
Diffstat (limited to 'tests/basics/seq_unpack.py')
-rw-r--r-- | tests/basics/seq_unpack.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/seq_unpack.py b/tests/basics/seq_unpack.py index af8b998d05..084ddb9f13 100644 --- a/tests/basics/seq_unpack.py +++ b/tests/basics/seq_unpack.py @@ -14,6 +14,13 @@ print(a, b) [a, b] = 100, 200 print(a, b) +# optimised 3-way swap +a = 1 +b = 2 +c = 3 +a, b, c = b, c, a +print(a, b, c) + try: a, b, c = (1, 2) except ValueError: |