diff --git a/tests/basics/class_reverse_op.py b/tests/basics/class_reverse_op.py index d41c55c9d7..1a047e4484 100644 --- a/tests/basics/class_reverse_op.py +++ b/tests/basics/class_reverse_op.py @@ -1,3 +1,6 @@ +import skip_if +skip_if.no_reverse_ops() + class A: def __init__(self, v): diff --git a/tests/circuitpython/nvm_present.py b/tests/circuitpython/nvm_present.py index a2cf3a22c2..bef80dcc61 100644 --- a/tests/circuitpython/nvm_present.py +++ b/tests/circuitpython/nvm_present.py @@ -1,4 +1,6 @@ import skip_if +# TODO(tannewt): Remove this when we add nvm support to 3.x +skip_if.always() skip_if.board_not_in("metro_m0_express", "feather_m0_express", "circuitplayground_express") import microcontroller diff --git a/tests/skip_if.py b/tests/skip_if.py index 7b1e068714..8d0ed8f214 100644 --- a/tests/skip_if.py +++ b/tests/skip_if.py @@ -27,6 +27,9 @@ def skip(): print("SKIP") raise SystemExit +def always(): + skip() + def no_reversed(): import builtins if "reversed" not in dir(builtins): @@ -89,3 +92,13 @@ def no_slice_assign(): m2[1:3] = m1[0:2] except TypeError: skip() + + +def no_reverse_ops(): + class Foo: + def __radd__(self, other): + pass + try: + 5 + Foo() + except TypeError: + skip()