Skip to content

Commit

Permalink
Stop using python setup.py test
Browse files Browse the repository at this point in the history
This causes us to run through setuptools without pip, meaning setuptools
thinks it should download eggs for setuptools_scm. O_o It's not really
something most projects use, and at any rate it's actually shorter to
use pytest directly. Getting rid of that means we don't need anything
for pytest-runner or the alias in setup.cfg.
  • Loading branch information
dopplershift committed Sep 19, 2019
1 parent edcf7e8 commit 1f005ea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -39,7 +39,7 @@ build: off

test_script:
- cmd: set TEST_DATA_DIR=%APPVEYOR_BUILD_FOLDER%\\staticdata
- cmd: python setup.py test --addopts "-s --junitxml=tests.xml --flake8 --mpl --cov=metpy -W error::metpy.deprecation.MetpyDeprecationWarning"
- cmd: pytest -s --junitxml=tests.xml --flake8 --mpl --cov=metpy -W error::metpy.deprecation.MetpyDeprecationWarning
- cmd: cd docs
- cmd: make overridecheck html
- cmd: cd ..
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -33,13 +33,13 @@ jobs:
paths:
- ./venv
key: v1-dependencies-{{ checksum "setup.py" }}

# run tests!
- run:
name: run tests
command: |
. venv/bin/activate
python setup.py test --addopts "-s --flake8 --mpl"
pytest -s --flake8 --mpl
- store_artifacts:
path: test-reports
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -129,7 +129,7 @@ script:
fi;
else
flake8 --version;
python setup.py test --addopts "$TEST_OUTPUT_CONTROL $TEST_OPTS";
pytest $TEST_OUTPUT_CONTROL $TEST_OPTS;
fi

after_script:
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Expand Up @@ -20,7 +20,6 @@ dependencies:
- pytest-cov
- pytest-flake8
- pytest-mpl
- pytest-runner
- flake8-builtins!=1.4.0
- flake8-comprehensions=1.4.1
- flake8-copyright
Expand Down
5 changes: 1 addition & 4 deletions setup.cfg
Expand Up @@ -52,7 +52,7 @@ exclude = doc, examples
dev = ipython[all]>=3.1
doc = sphinx>=1.8; sphinx-gallery>=0.4; doc8; m2r; netCDF4
examples = cartopy>=0.13.1; matplotlib>=2.2.0; pyproj>=1.9.4,!=2.0.0
test = pytest>=2.4; pytest-runner; pytest-mpl; pytest-flake8; cartopy>=0.16.0; flake8>3.2.0; flake8-builtins!=1.4.0; flake8-comprehensions; flake8-copyright; flake8-docstrings; flake8-import-order; flake8-mutable; flake8-pep3101; flake8-print; flake8-quotes; flake8-rst-docstrings; pep8-naming; netCDF4; pyproj>=1.9.4,!=2.0.0
test = pytest>=2.4; pytest-mpl; pytest-flake8; cartopy>=0.16.0; flake8>3.2.0; flake8-builtins!=1.4.0; flake8-comprehensions; flake8-copyright; flake8-docstrings; flake8-import-order; flake8-mutable; flake8-pep3101; flake8-print; flake8-quotes; flake8-rst-docstrings; pep8-naming; netCDF4; pyproj>=1.9.4,!=2.0.0

[bdist_wheel]
# This flag says that the code is written to work on both Python 2 and 3.
Expand All @@ -63,9 +63,6 @@ source-dir = docs/source
build-dir = docs/build
all-files = True

[aliases]
test = pytest

[pycodestyle]
ignore = W503
max-line-length = 95
Expand Down

0 comments on commit 1f005ea

Please sign in to comment.