diff options
author | stijn <stijn@ignitron.net> | 2020-06-18 11:19:14 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-09-04 00:10:24 +1000 |
commit | 40ad8f1666b265dafc7844d765f45cfae4b6299f (patch) | |
tree | d073a4b4f791f53d1a73c47d029bf2b49f041d5e /tests/basics/string_compare.py | |
parent | b0932fcf2e2f9a81abf7737ed4b2573bd9ad4a49 (diff) |
all: Rename "sys" module to "usys".
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.
Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
Diffstat (limited to 'tests/basics/string_compare.py')
-rw-r--r-- | tests/basics/string_compare.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/basics/string_compare.py b/tests/basics/string_compare.py index 6515809b3..f34879df2 100644 --- a/tests/basics/string_compare.py +++ b/tests/basics/string_compare.py @@ -51,7 +51,10 @@ print("1/" <= "1") # this tests an internal string that doesn't have a hash with a string # that does have a hash, but the lengths of the two strings are different -import sys +try: + import usys as sys +except ImportError: + import sys print(sys.version == 'a long string that has a hash') # this special string would have a hash of 0 but is incremented to 1 |