diff options
| author | Matthias Koeppe <mkoeppe@math.ucdavis.edu> | 2021-11-09 14:53:40 -0800 |
|---|---|---|
| committer | Matthias Koeppe <mkoeppe@math.ucdavis.edu> | 2021-11-09 14:53:40 -0800 |
| commit | 802d8723cb8623b0bed230d0e117a372e040fe8e (patch) | |
| tree | 3ad41bf44e08b08bb178fe1dd662de3394dfb5c6 | |
| parent | 822463194a4720288a2df8c9573d0a1f9726764b (diff) | |
| download | python-setuptools-git-802d8723cb8623b0bed230d0e117a372e040fe8e.tar.gz | |
tox.ini (testenv): Make sure to import setuptools before distutils when invoking pytest
| -rw-r--r-- | tox.ini | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -12,7 +12,11 @@ deps = # TODO: remove after Sphinx>4.1.2 is available. sphinx@git+https://github.com/sphinx-doc/sphinx; python_version>="3.10" commands = - pytest {posargs} + # We invoke pytest like this to avoid the warning: + # UserWarning: Distutils was imported before Setuptools, + # but importing Setuptools also replaces the `distutils` + # module in `sys.modules`. + pytest -c 'import setuptools; import pytest; pytest.main("{posargs}".split())' usedevelop = True extras = testing passenv = |
