aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/python/3 cython/cytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/python/3 cython/cytest.py')
-rwxr-xr-xmeson/test cases/python/3 cython/cytest.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meson/test cases/python/3 cython/cytest.py b/meson/test cases/python/3 cython/cytest.py
new file mode 100755
index 000000000..c08ffeed3
--- /dev/null
+++ b/meson/test cases/python/3 cython/cytest.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+from storer import Storer
+
+s = Storer()
+
+if s.get_value() != 0:
+ raise SystemExit('Initial value incorrect.')
+
+s.set_value(42)
+
+if s.get_value() != 42:
+ raise SystemExit('Setting value failed.')
+
+try:
+ s.set_value('not a number')
+ raise SystemExit('Using wrong argument type did not fail.')
+except TypeError:
+ pass