diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..3b5f6b7 --- /dev/null +++ b/plan.fmf @@ -0,0 +1,20 @@ +execute: + how: tmt +environment: + PYTHON: python3.11 +discover: + - how: shell + dist-git-source: true + tests: + - name: bundled demos + require: + - python3.11-devel + - python3.11-numpy + - gcc-c++ + - gcc + test: | + cd $TMT_SOURCE_DIR/cython-*/Demos && + sed "s/\bpython\b/python3.11/" -i Makefile callback/Makefile \ + embed/Makefile && + make test + - how: fmf diff --git a/tests/helloworld.pyx b/tests/helloworld.pyx new file mode 100644 index 0000000..fd3b671 --- /dev/null +++ b/tests/helloworld.pyx @@ -0,0 +1,5 @@ +# https://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html +print("Hello World") + +def works(): + return True diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..c92c0b5 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +test: ${PYTHON:-python3} tutorial.py + diff --git a/tests/tutorial.py b/tests/tutorial.py new file mode 100644 index 0000000..39e8499 --- /dev/null +++ b/tests/tutorial.py @@ -0,0 +1,5 @@ +import pyximport +pyximport.install() + +import helloworld +assert helloworld.works()