Debian Codegraph @

test cases/python/3 cython/cytest.py

raw
1 #!/usr/bin/env python3
2
3 from storer import Storer
4
5 s = Storer()
6
7 if s.get_value() != 0:
8 raise SystemExit('Initial value incorrect.')
9
10 s.set_value(42)
11
12 if s.get_value() != 42:
13 raise SystemExit('Setting value failed.')
14
15 try:
16 s.set_value('not a number')
17 raise SystemExit('Using wrong argument type did not fail.')
18 except TypeError:
19 pass