Skip to content

Commit b761d2c

Browse files
authored
Merge pull request #741 from CEED/jed/python-test-docs
Fix python test docs
2 parents 14e5f01 + 0ef7259 commit b761d2c

32 files changed

Lines changed: 15 additions & 9 deletions

.github/workflows/python-test-with-style.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ jobs:
3030
make -j2
3131
export CEED_DIR=$PWD
3232
pip install .
33-
cd tests/python
34-
python setup-qfunctions.py build
35-
pytest test-*.py --ceed /cpu/self/ref/serial -vv
33+
cd python/tests
34+
PYTHON=python3 make test TEST_OPTS="--ceed /cpu/self/ref/serial -vv"
3635
cd ../..
3736
- name: Python style
3837
env:

python/make-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ done
1414
for PYBIN in /opt/python/cp3[6789]*/bin; do
1515
$PYBIN/pip install --user --upgrade -r requirements-test.txt
1616
$PYBIN/pip install --user libceed --no-index --find-links wheelhouse/
17-
pushd tests/python
17+
pushd python/tests
1818
$PYBIN/python setup-qfunctions.py build
1919
$PYBIN/python -m pytest test-*.py --ceed /cpu/self/opt/blocked -vv
2020
popd
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@
1717
clean:
1818
rm -rf build __pycache__ .pytest_cache *.so
1919

20-
.PHONY: cln clean
20+
setup:
21+
$(PYTHON) setup-qfunctions.py build
22+
23+
TEST_OPTS ?= --ceed /cpu/self/ref/serial
24+
test: setup
25+
$(PYTHON) -m pytest test-*.py $(TEST_OPTS)
26+
27+
.PHONY: clean setup test
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# libCEED Python Tests
22

33
These files provide libCEED for Python tests. Full examples of finite element
4-
operators can be found in the file `test-ceed-operator.py`.
4+
operators can be found in the file `test-5-operator.py`.
55

66
## Testing
77

@@ -11,13 +11,13 @@ To run the tests, first build the user QFunctions file by running
1111

1212
Then, to run the test suite use the command
1313

14-
pytest test-ceed*.py --ceed /cpu/self/ref/serial
14+
pytest test-*.py --ceed /cpu/self/ref/serial
1515

1616
## Building QFunctions
1717

1818
To build user defined QFunctions, modify `libceed-qfunctions.c` to include
1919
the apropriate QFunction single source file and run
20-
`python setup-qfunctions.py build`. The files `test-ceed-qfunction.py` and
21-
`test-ceed-operator.py` both contain the example function `load_qfs_so()` for
20+
`python setup-qfunctions.py build`. The files `test-4-qfunction.py` and
21+
`test-5-operator.py` both contain the example function `load_qfs_so()` for
2222
loading the user defined QFunctions so the QFunction pointers can be passed to
2323
libCEED.

0 commit comments

Comments
 (0)