summaryrefslogtreecommitdiffstatshomepage
path: root/tests/pyb/can.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-06 13:48:01 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-06 13:50:34 +1100
commitd3bb3e38df3fcb2b980d37e06fde7eac9e689f6a (patch)
treec40a640ef34bceddc2d1aac602717b23f58d2196 /tests/pyb/can.py
parent27c149efe030b6fd24c0cc1475ea509da1a72821 (diff)
downloadmicropython-d3bb3e38df3fcb2b980d37e06fde7eac9e689f6a.tar.gz
micropython-d3bb3e38df3fcb2b980d37e06fde7eac9e689f6a.zip
tests/pyb: Adjust tests so they can run on PYB and PYBLITE.
A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
Diffstat (limited to 'tests/pyb/can.py')
-rw-r--r--tests/pyb/can.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/pyb/can.py b/tests/pyb/can.py
index 594d1d5093..617eb7cccc 100644
--- a/tests/pyb/can.py
+++ b/tests/pyb/can.py
@@ -1,4 +1,10 @@
-from pyb import CAN
+try:
+ from pyb import CAN
+except ImportError:
+ print('SKIP')
+ import sys
+ sys.exit()
+
import pyb
# test we can correctly create by id or name