finish migration to pytest
continuous-integration/drone/push Build is failing Details

pull/332/head
Sebastian Heimann 7 months ago
parent 5926b50580
commit d6d9e78e4d

@ -11,10 +11,10 @@ Pyrocko uses Setuptools for its installation script. See `setup.py` and
## Testing
Nosetests is used for testing. To run all tests, run
Pytest is used for testing. To run all tests, run
```sh
python -m nose test
python -m pytest
```
## CI

@ -33,7 +33,7 @@ installed from source:
* Optional Python modules:
* `Jinja2 <http://jinja.pocoo.org/>`_ (required for the :ref:`fomosto report <fomosto_report>` subcommand)
* `nosetests <https://pypi.python.org/pypi/nose>`_ (to run the unittests)
* `pytest <https://pytest.org>`_ (to run the unittests)
* `coverage <https://pypi.python.org/pypi/coverage>`_ (unittest coverage report)
* Manually install these optional software tools:

@ -17,7 +17,7 @@ RUN apt-get install -y python3-dev python3-setuptools python3-numpy-dev
# testing requirements
RUN apt-get install -y xvfb libgles2-mesa
RUN apt-get install -y python3-coverage python3-nose python3-pytest
RUN apt-get install -y python3-coverage python3-pytest
# base runtime requirements
RUN apt-get install -y \

@ -3,4 +3,3 @@ scipy
pyyaml
matplotlib
requests
nose

@ -3,4 +3,3 @@ scipy
pyyaml
matplotlib
requests
nose

@ -3,5 +3,4 @@ scipy
pyyaml
matplotlib
requests
nose
PyOpenGL

@ -3,5 +3,4 @@ scipy
pyyaml
matplotlib
requests
nose
PyOpenGL

@ -3,5 +3,4 @@ scipy
pyyaml
matplotlib
requests
nose
PyOpenGL

@ -1,7 +0,0 @@
#!/bin/bash
set -e
pip3 install -r requirements-all.txt
pip3 install -f wheels --no-index pyrocko
python3 -m nose test.base.test_util test.base.test_eikonal

@ -36,5 +36,5 @@ echo "backend : agg" > "$HOME/.config/matplotlib/matplotlibrc"
python3 install.py deps system --yes && \
python3 install.py system --yes && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -41,5 +41,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python install.py deps conda --yes && \
python install.py user --yes && \
python -m pyrocko.print_version deps >> "$outfile_py3" && \
python -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
python -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -37,5 +37,5 @@ pip3=/usr/bin/pip3
"$python3" install.py deps system --yes && \
sudo "$pip3" install --no-deps --force-reinstall --upgrade . && \
"$python3" -m pyrocko.print_version deps >> "$outfile_py3" && \
"$python3" -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
"$python3" -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -38,5 +38,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
python3 install.py system --yes && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -38,5 +38,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
python3 install.py system --yes && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -38,5 +38,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
sudo pip3 install --no-deps --force-reinstall --upgrade . && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -60,10 +60,10 @@ conda install -y \
pyyaml \
requests \
jinja2 \
nose
pytest
python3 install.py deps conda --yes && \
python3 install.py user --yes && \
python3 -m pyrocko.print_version deps >> "$outfile" && \
python3 -m nose "$thetest" > >(tee -a "$outfile") 2> >(tee -a "$outfile" >&2) || \
python3 -m pytest -v "$thetest" > >(tee -a "$outfile") 2> >(tee -a "$outfile" >&2) || \
/usr/bin/true

@ -38,5 +38,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
sudo pip3 install --no-deps --force-reinstall --upgrade . && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -36,5 +36,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
sudo pip3 install --no-deps --force-reinstall --upgrade . && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -36,5 +36,5 @@ ln -s "/vagrant/example_run_dir" "test/example_run_dir"
python3 install.py deps system --yes && \
python3 install.py system --yes && \
python3 -m pyrocko.print_version deps >> "$outfile_py3" && \
xvfb-run -s '-screen 0 640x480x24' python3 -m nose "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
xvfb-run -s '-screen 0 640x480x24' python3 -m pytest -v "$thetest" > >(tee -a "$outfile_py3") 2> >(tee -a "$outfile_py3" >&2) || \
/bin/true

@ -6,4 +6,4 @@ sudo pacman -Syu --noconfirm --needed \
python-pyqt5 qt5-webengine qt5-svg qt5-webkit \
python-cairo \
python-requests python-yaml python-jinja \
python-nose python-coverage
python-pytest python-coverage

@ -4,5 +4,5 @@ sudo yum -y install epel-release dnf-plugins-core
sudo yum config-manager --set-enabled powertools
sudo yum -y install make gcc patch git python3 python3-yaml python3-matplotlib python3-numpy \
python3-scipy python3-requests python3-coverage python3-nose python3-jinja2 \
python3-scipy python3-requests python3-coverage python3-pytest python3-jinja2 \
python3-qt5 python3-matplotlib-qt5

@ -6,4 +6,4 @@ sudo apt-get install -y make git python3-dev python3-setuptools python3-pip \
python3-matplotlib python3-pyqt5 python3-pyqt5.qtopengl \
python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-yaml \
python3-jinja2 python3-requests python3-coverage \
python3-nose
python3-pytest

@ -6,5 +6,5 @@ sudo zypper -n install make git gcc python3-devel python3-setuptools \
python3-matplotlib-qt4 \
python3-PyYAML python3-Jinja2 \
python3-requests \
python3-nose python3-coverage
python3-pytest python3-coverage

@ -5,7 +5,7 @@ scipy>=1.0
pyyaml
matplotlib
requests
nose
pytest
jinja2
pybtex
PyQt5

@ -8,6 +8,5 @@ scipy>=1.0
pyyaml
matplotlib
requests
nose
jinja2
pyqt

@ -7,11 +7,6 @@ universal=1
[build_ext]
inplace=0
[nosetests]
verbosity=2
cover-erase=1
cover-package=pyrocko
[coverage:report]
exclude_lines =
def __repr__

Loading…
Cancel
Save