With the aim of getting consistency, and removing the need to learn an additional term, replace uses of uPy/uPython with MPy/MicroPython. Rule of thumb was to use "MPy" abbreviation where "CPy" is used nearby, but the full word MicroPython otherwise. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
26 lines
387 B
Python
26 lines
387 B
Python
# test errors in regex
|
|
|
|
try:
|
|
import re
|
|
except ImportError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
|
|
def test_re(r):
|
|
try:
|
|
re.compile(r)
|
|
print("OK")
|
|
except: # MPy and CPy use different errors, so just ignore the type
|
|
print("Error")
|
|
|
|
|
|
test_re(r"?")
|
|
test_re(r"*")
|
|
test_re(r"+")
|
|
test_re(r")")
|
|
test_re(r"[")
|
|
test_re(r"([")
|
|
test_re(r"([)")
|
|
test_re(r"[a\]")
|