summaryrefslogtreecommitdiff
path: root/test cases/python/1 extmodule/blaster.py
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2018-03-13 21:01:09 +0100
committerMathieu Duponchelle <mathieu@centricular.com>2018-04-06 22:43:35 +0200
commite1b138a21b45fe9b55f3bb7d9b1e0bbbd45a7609 (patch)
tree21819f98804836134e83f27063a9d1014a6aa669 /test cases/python/1 extmodule/blaster.py
parentaef1a81b3586aeb48988b60fbeaef5c19e112c45 (diff)
downloadmeson-e1b138a21b45fe9b55f3bb7d9b1e0bbbd45a7609.tar.gz
Implement a generic python module
With contributions from HÃ¥vard Graff
Diffstat (limited to 'test cases/python/1 extmodule/blaster.py')
-rwxr-xr-xtest cases/python/1 extmodule/blaster.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test cases/python/1 extmodule/blaster.py b/test cases/python/1 extmodule/blaster.py
new file mode 100755
index 000000000..163b6d426
--- /dev/null
+++ b/test cases/python/1 extmodule/blaster.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import sys
+import tachyon
+
+result = tachyon.phaserize('shoot')
+
+if not isinstance(result, int):
+ print('Returned result not an integer.')
+ sys.exit(1)
+
+if result != 1:
+ print('Returned result {} is not 1.'.format(result))
+ sys.exit(1)