From 50da2e91fcb0b11873cfcab9154b2b43c8706a32 Mon Sep 17 00:00:00 2001 From: Pierre Raybaut Date: Tue, 12 Mar 2024 14:35:48 +0100 Subject: [PATCH] pytest: moved conftest.py to project root --- .github/workflows/python-package.yml | 2 +- plotpy/tests/conftest.py => conftest.py | 0 doc/dev/build.rst | 4 ++-- doc/dev/contribute.rst | 2 +- doc/dev/platforms.rst | 4 ++-- scripts/run_pytest.bat | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename plotpy/tests/conftest.py => conftest.py (100%) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index aa3036e4..421c342f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -46,4 +46,4 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest plotpy + pytest diff --git a/plotpy/tests/conftest.py b/conftest.py similarity index 100% rename from plotpy/tests/conftest.py rename to conftest.py diff --git a/doc/dev/build.rst b/doc/dev/build.rst index 39ae058d..7997c97a 100644 --- a/doc/dev/build.rst +++ b/doc/dev/build.rst @@ -29,11 +29,11 @@ To run the unittests, you need: Then run the following command:: - pytest plotpy + pytest To run test with coverage support, use the following command:: - pytest -v --cov --cov-report=html plotpy + pytest -v --cov --cov-report=html Code formatting diff --git a/doc/dev/contribute.rst b/doc/dev/contribute.rst index ff5b5f2b..d991a43c 100644 --- a/doc/dev/contribute.rst +++ b/doc/dev/contribute.rst @@ -75,7 +75,7 @@ Before submitting a patch, please check the following points: .. code-block:: bash - pytest plotpy + pytest Pull request ~~~~~~~~~~~~ diff --git a/doc/dev/platforms.rst b/doc/dev/platforms.rst index efee4731..d8669b0a 100644 --- a/doc/dev/platforms.rst +++ b/doc/dev/platforms.rst @@ -72,7 +72,7 @@ That's it, you can now run the tests using the following command: .. code-block:: bash - pytest plotpy + pytest If you want to rely on Visual Studio Code for editing and take advantage of the project settings and tasks, you will need to set the following environment variable: @@ -160,4 +160,4 @@ That's it, you can now run the tests using the following command: .. code-block:: bash - pytest plotpy \ No newline at end of file + pytest \ No newline at end of file diff --git a/scripts/run_pytest.bat b/scripts/run_pytest.bat index f7794d7b..d49d462c 100644 --- a/scripts/run_pytest.bat +++ b/scripts/run_pytest.bat @@ -19,7 +19,7 @@ for /D %%d in ("%DIR0%*") do ( set WINPYDIRBASE=%%d call !WINPYDIRBASE!\scripts\env.bat echo Running pytest from "%%d": - pytest --ff -q %MODNAME% + pytest --ff -q echo ---- ) call %FUNC% EndOfScript