Skip to content

Commit 9915356

Browse files
committed
tests: Fixup tests for 3.x on Rosie
1 parent ecc47d5 commit 9915356

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

tests/basics/class_reverse_op.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import skip_if
2+
skip_if.no_reverse_ops()
3+
14
class A:
25

36
def __init__(self, v):

tests/circuitpython/nvm_present.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import skip_if
2+
# TODO(tannewt): Remove this when we add nvm support to 3.x
3+
skip_if.always()
24
skip_if.board_not_in("metro_m0_express", "feather_m0_express", "circuitplayground_express")
35

46
import microcontroller

tests/skip_if.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ def skip():
2727
print("SKIP")
2828
raise SystemExit
2929

30+
def always():
31+
skip()
32+
3033
def no_reversed():
3134
import builtins
3235
if "reversed" not in dir(builtins):
@@ -89,3 +92,13 @@ def no_slice_assign():
8992
m2[1:3] = m1[0:2]
9093
except TypeError:
9194
skip()
95+
96+
97+
def no_reverse_ops():
98+
class Foo:
99+
def __radd__(self, other):
100+
pass
101+
try:
102+
5 + Foo()
103+
except TypeError:
104+
skip()

0 commit comments

Comments
 (0)