parent
173d1624cb
commit
4f1a240bc2
5 changed files with 9 additions and 20 deletions
@ -1,9 +1,8 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
from gluon import gluonator |
||||
import sys |
||||
|
||||
print('Running mainprog from root dir.') |
||||
|
||||
if gluonator.gluoninate() != 42: |
||||
sys.exit(1) |
||||
raise ValueError("!= 42") |
||||
|
@ -1,14 +1,11 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import tachyon |
||||
import sys |
||||
|
||||
result = tachyon.phaserize('shoot') |
||||
|
||||
if not isinstance(result, int): |
||||
print('Returned result not an integer.') |
||||
sys.exit(1) |
||||
raise SystemExit('Returned result not an integer.') |
||||
|
||||
if result != 1: |
||||
print('Returned result {} is not 1.'.format(result)) |
||||
sys.exit(1) |
||||
raise SystemExit('Returned result {} is not 1.'.format(result)) |
||||
|
@ -1,23 +1,19 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
from storer import Storer |
||||
import sys |
||||
|
||||
s = Storer() |
||||
|
||||
if s.get_value() != 0: |
||||
print('Initial value incorrect.') |
||||
sys.exit(1) |
||||
raise SystemExit('Initial value incorrect.') |
||||
|
||||
s.set_value(42) |
||||
|
||||
if s.get_value() != 42: |
||||
print('Setting value failed.') |
||||
sys.exit(1) |
||||
raise SystemExit('Setting value failed.') |
||||
|
||||
try: |
||||
s.set_value('not a number') |
||||
print('Using wrong argument type did not fail.') |
||||
sys.exit(1) |
||||
raise SystemExit('Using wrong argument type did not fail.') |
||||
except TypeError: |
||||
pass |
||||
|
Loading…
Reference in new issue