diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-11-16 10:33:48 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-11-16 10:56:20 -0800 |
| commit | 99153569f41e7c40a69ec64c25f3eb278c68c51e (patch) | |
| tree | 1aee859743a8861f0fe4a18e92024b2fa86bd97d /tests | |
| parent | ecc47d5258acfd903d3aba03b336e248e85ff5c2 (diff) | |
tests: Fixup tests for 3.x on Rosie
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/class_reverse_op.py | 3 | ||||
| -rw-r--r-- | tests/circuitpython/nvm_present.py | 2 | ||||
| -rw-r--r-- | tests/skip_if.py | 13 |
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/basics/class_reverse_op.py b/tests/basics/class_reverse_op.py index d41c55c9d..1a047e448 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 a2cf3a22c..bef80dcc6 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 7b1e06871..8d0ed8f21 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() |
