mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
tests/float: Convert "sys.exit()" to "raise SystemExit".
The latter is shorter and simpler because it doesn't require importing the sys module.
This commit is contained in:
@@ -4,8 +4,7 @@ try:
|
||||
import math
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
import sys
|
||||
sys.exit()
|
||||
raise SystemExit
|
||||
|
||||
for fun in (math.ceil, math.floor, math.trunc):
|
||||
for x in (-1.6, -0.2, 0, 0.6, 1.4, float('inf'), float('nan')):
|
||||
|
||||
Reference in New Issue
Block a user