mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
96c926e4b3
commit
1e77f369a2
@ -62,7 +62,7 @@ else:
|
||||
if sys.platform in ['linux', 'darwin']:
|
||||
cmd = './main'
|
||||
elif sys.platform == 'win32':
|
||||
cmd = 'main.exe'
|
||||
cmd = '.\main.exe'
|
||||
else:
|
||||
cmd = None
|
||||
|
||||
@ -80,9 +80,8 @@ else:
|
||||
|
||||
|
||||
print(add(1, 2))
|
||||
print(A('abc').get())
|
||||
''', capture_output=True, check=True)
|
||||
print(A('abc').get())''', capture_output=True, check=True)
|
||||
res.check_returncode()
|
||||
assert res.stdout.endswith('>>> 3\n>>> abc\n>>> ')
|
||||
assert res.stdout.endswith('>>> 3\n>>> abc\n>>> '), res.stdout
|
||||
|
||||
print("ALL TESTS PASSED")
|
@ -115,3 +115,5 @@ try:
|
||||
exit(1)
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
assert not 1 < 2 > 3
|
||||
|
@ -27,3 +27,6 @@ def f():
|
||||
assert value == 1
|
||||
|
||||
f()
|
||||
|
||||
from math import *
|
||||
assert pi > 3
|
||||
|
@ -1,3 +1,14 @@
|
||||
try:
|
||||
raise 1
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
assert False
|
||||
exit(1)
|
||||
except AssertionError:
|
||||
pass
|
||||
|
||||
try:
|
||||
for i in range(5):
|
||||
raise KeyError(i)
|
||||
|
@ -674,3 +674,11 @@ assert issubclass(object, object) is True
|
||||
assert issubclass(int, type) is False
|
||||
assert issubclass(type, type) is True
|
||||
assert issubclass(float, int) is False
|
||||
|
||||
|
||||
def f(a, b):
|
||||
c = a
|
||||
del a
|
||||
return sum([b, c])
|
||||
|
||||
assert f(1, 2) == 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user