# test errors in regextry:importureasreexcept:importredeftest_re(r):try:re.compile(r)print("OK")except:# uPy and CPy use different errors, so just ignore the typeprint("Error")test_re(r'?')test_re(r'*')test_re(r'+')test_re(r')')test_re(r'[')test_re(r'([')test_re(r'([)')