summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_repr.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-10-18 19:18:06 +1100
committerDamien George <damien.p.george@gmail.com>2019-10-29 22:22:37 +1100
commit709136e844f93eb7b9ea8c14e9daa5da8e8293d3 (patch)
treed2b585ef47209d414dccbe4ab5383979370baf7d /tests/basics/string_repr.py
parent4847460232764a116b731da077074818e316fb55 (diff)
downloadmicropython-709136e844f93eb7b9ea8c14e9daa5da8e8293d3.tar.gz
micropython-709136e844f93eb7b9ea8c14e9daa5da8e8293d3.zip
tests/basics: Use str.format instead of % for formatting messages.
Only use % formatting when testing % itself, because only str.format is guaranteed to be available on any port.
Diffstat (limited to 'tests/basics/string_repr.py')
-rw-r--r--tests/basics/string_repr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/basics/string_repr.py b/tests/basics/string_repr.py
index 2a3ef2527c..b4842e1475 100644
--- a/tests/basics/string_repr.py
+++ b/tests/basics/string_repr.py
@@ -1,4 +1,4 @@
# anything above 0xa0 is printed as Unicode by CPython
# the abobe is CPython implementation detail, stick to ASCII
for c in range(0x80):
- print("0x%02x: %s" % (c, repr(chr(c))))
+ print("0x{:02x}: {}".format(c, repr(chr(c))))