From ad743c08152de6553fedcea7c88b6091de14bb24 Mon Sep 17 00:00:00 2001 From: James Myatt Date: Mon, 11 Oct 2021 11:55:20 +0100 Subject: [PATCH] `setup.py test` is deprecated (#3317) * `setup.py test` is deprecated * `setup.py test` is deprecated * update * update Co-authored-by: rusty1s --- .github/workflows/testing.yml | 2 +- CONTRIBUTING.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d5be6f1989ce..b93a403a9f2e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -59,7 +59,7 @@ jobs: - name: Run test-suite run: | - python setup.py test + python -m pytest - name: Generate coverage report if: success() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f14f89c1fcc..dc5ca44968b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Hence, if you modify a Python file, you do not need to reinstall PyG again and a 5. Ensure that you have a working PyG installation by running the entire test suite with ``` -python setup.py test +python -m pytest ``` In case an error occurs, please first check if all sub-packages ([`torch-scatter`](https://github.com/rusty1s/pytorch_scatter), [`torch-sparse`](https://github.com/rusty1s/pytorch_sparse), [`torch-cluster`](https://github.com/rusty1s/pytorch_cluster) and [`torch-spline-conv`](https://github.com/rusty1s/pytorch_spline_conv)) are on its latest reported version. @@ -56,10 +56,10 @@ The PyG testing suite is located under `test/`. Run the entire test suite with ``` -python setup.py test +python -m pytest ``` -or run individual test files, like `pytest --no-cov test/utils/test_convert.py`, for individual test suites. +or run individual test files, like `python -m pytest --no-cov test/utils/test_convert.py`, for individual test suites. ## Continuous Integration @@ -79,7 +79,7 @@ If you do not want to format your code manually, we recommend to use [`yapf`](ht 2. Ensure that the entire test suite passes and that code coverage roughly stays the same. Please feel encouraged to provide a test with your submitted code. ``` -python setup.py test +python -m pytest ``` ## Building Documentation