Skip to content

Commit 78aa312

Browse files
committed
Remove obsolete python setup.py test command
1 parent eee9ad6 commit 78aa312

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

.github/workflows/unix.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ jobs:
2828
conda install --yes cython numpy scipy h5py openpmd-api matplotlib jupyter pytest pyflakes python=${{ matrix.python-version }} python-wget
2929
else
3030
conda install --yes cython numpy scipy h5py matplotlib jupyter pytest pyflakes python=${{ matrix.python-version }} python-wget
31-
fi
31+
fi;
32+
python setup.py install
3233
3334
- shell: bash -eo pipefail -l {0}
3435
name: pyflakes
3536
run: python -m pyflakes openpmd_viewer
3637
- shell: bash -eo pipefail -l {0}
3738
name: Test
38-
run: python setup.py test
39+
run: python -m pytest tests

.github/workflows/windows.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: actions/checkout@v3
1616
- name: Install dependencies
1717
run: |
18-
python -m pip install cython numpy scipy h5py openpmd-api matplotlib jupyter pytest pyflakes wget
18+
python -m pip install cython numpy scipy h5py openpmd-api matplotlib jupyter pytest pyflakes wget;
19+
python setup.py install
1920
- name: Test
20-
run: python setup.py test
21+
run: python -m pytest tests

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ git pull [email protected]:openPMD/openPMD-viewer.git dev
5656
```
5757
python -m pip wheel .
5858
python -m pip install *whl matplotlib jupyter
59-
python setup.py test
59+
python -m pytest tests
6060
```
6161
(Be patient: the `test_tutorials.py` can take approx. 20 seconds if
6262
you already downloaded the example openPMD files that are required

setup.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import sys
21
from setuptools import setup, find_packages
3-
from setuptools.command.test import test as TestCommand
42

53
# Get the long description
64
with open('./README.md') as f:
@@ -14,14 +12,6 @@
1412
with open('./openpmd_viewer/__version__.py') as f:
1513
exec( f.read() )
1614

17-
# Define a custom class to run the py.test with `python setup.py test`
18-
class PyTest(TestCommand):
19-
20-
def run_tests(self):
21-
import pytest
22-
errcode = pytest.main([])
23-
sys.exit(errcode)
24-
2515
# Main setup command
2616
setup(name='openPMD-viewer',
2717
version=__version__,
@@ -35,7 +25,6 @@ def run_tests(self):
3525
packages=find_packages('.'),
3626
package_data={'openpmd_viewer': ['notebook_starter/*.ipynb']},
3727
scripts=['openpmd_viewer/notebook_starter/openPMD_notebook'],
38-
tests_require=['pytest', 'jupyter'],
3928
install_requires=install_requires,
4029
extras_require = {
4130
'all': ["ipympl", "ipywidgets", "matplotlib", "numba", "openpmd-api", "wget"],
@@ -45,7 +34,6 @@ def run_tests(self):
4534
'numba': ["numba"],
4635
'openpmd-api': ["openpmd-api"]
4736
},
48-
cmdclass={'test': PyTest},
4937
platforms='any',
5038
python_requires='>=3.8',
5139
classifiers=[

tests/test_tutorials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
by any of the following commands
99
$ python tests/test_tutorials.py
1010
$ py.test
11-
$ python setup.py test
11+
$ python -m pytest tests
1212
1313
Copyright 2015-2016, openPMD-viewer contributors
1414
Authors: Remi Lehe, Axel Huebl

0 commit comments

Comments
 (0)