summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytes_escape_unicode.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-05-28 10:52:12 +1000
committerDamien George <damien@micropython.org>2024-05-28 10:58:37 +1000
commit30a9ccf4caa72c62cb8656a1572518fef34b08a4 (patch)
tree125f373f880e1b3e1b632d1d5e2f5e90665e8cc3 /tests/basics/bytes_escape_unicode.py
parentdd4767a7d1ba57f107a652310fdfbd0f0274a0c8 (diff)
downloadmicropython-30a9ccf4caa72c62cb8656a1572518fef34b08a4.tar.gz
micropython-30a9ccf4caa72c62cb8656a1572518fef34b08a4.zip
tests/basics: Move str/bytes tests that give SyntaxWarning to sep file.
In CPython 3.12 these invalid str/bytes/fstring escapes will issue a SyntaxWarning, and so differ to MicroPython. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/basics/bytes_escape_unicode.py')
-rw-r--r--tests/basics/bytes_escape_unicode.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/basics/bytes_escape_unicode.py b/tests/basics/bytes_escape_unicode.py
new file mode 100644
index 0000000000..1e450696f4
--- /dev/null
+++ b/tests/basics/bytes_escape_unicode.py
@@ -0,0 +1,3 @@
+# Coverage test for unicode escape in a bytes literal.
+# CPython issues a SyntaxWarning for this.
+print(b"\u1234")