From 85d809d1f4e35a511e0a56b3411126e05a31c01b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 10 Jun 2017 20:14:16 +0300 Subject: tests: Convert remaining "sys.exit()" to "raise SystemExit". --- tests/pyb/can.py | 3 +-- tests/pyb/dac.py | 3 +-- tests/pyb/pyb_f405.py | 3 +-- tests/pyb/pyb_f411.py | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'tests/pyb') diff --git a/tests/pyb/can.py b/tests/pyb/can.py index 7f2d070ec..0fd8c8368 100644 --- a/tests/pyb/can.py +++ b/tests/pyb/can.py @@ -2,8 +2,7 @@ try: from pyb import CAN except ImportError: print('SKIP') - import sys - sys.exit() + raise SystemExit import pyb diff --git a/tests/pyb/dac.py b/tests/pyb/dac.py index 942f30354..6f03bbc64 100644 --- a/tests/pyb/dac.py +++ b/tests/pyb/dac.py @@ -2,8 +2,7 @@ import pyb if not hasattr(pyb, 'DAC'): print('SKIP') - import sys - sys.exit() + raise SystemExit dac = pyb.DAC(1) print(dac) diff --git a/tests/pyb/pyb_f405.py b/tests/pyb/pyb_f405.py index 3c81fe109..2f161ae09 100644 --- a/tests/pyb/pyb_f405.py +++ b/tests/pyb/pyb_f405.py @@ -4,8 +4,7 @@ import os, pyb if not 'STM32F405' in os.uname().machine: print('SKIP') - import sys - sys.exit() + raise SystemExit print(pyb.freq()) print(type(pyb.rng())) diff --git a/tests/pyb/pyb_f411.py b/tests/pyb/pyb_f411.py index 328653965..50de30282 100644 --- a/tests/pyb/pyb_f411.py +++ b/tests/pyb/pyb_f411.py @@ -4,7 +4,6 @@ import os, pyb if not 'STM32F411' in os.uname().machine: print('SKIP') - import sys - sys.exit() + raise SystemExit print(pyb.freq()) -- cgit v1.2.3