diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index fb1838871..5bda87613 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -82,7 +82,7 @@ General Guidelines should adapt to the breaking change in docs/upgrade.rst. - Write inline documentation for new classes and methods. - Write tests and make sure they pass (make sure you have a mongod - running on the default port, then execute ``python setup.py test`` + running on the default port, then execute ``pytest tests/`` from the cmd line to run the test suite). - Ensure tests pass on all supported Python, PyMongo, and MongoDB versions. You can test various Python and PyMongo versions locally by executing diff --git a/README.rst b/README.rst index 64e43b6bc..d992da2b3 100644 --- a/README.rst +++ b/README.rst @@ -125,8 +125,7 @@ Some simple examples of what MongoEngine code looks like: Tests ===== To run the test suite, ensure you are running a local instance of MongoDB on -the standard port and have ``pytest`` installed. Then, run ``python setup.py test`` -or simply ``pytest``. +the standard port and have ``pytest`` installed. Then, run ``pytest tests/``. To run the test suite on every supported Python and PyMongo version, you can use ``tox``. You'll need to make sure you have each supported Python version @@ -139,15 +138,6 @@ installed in your environment and then: # Run the test suites $ tox -If you wish to run a subset of tests, use the pytest convention: - -.. code-block:: shell - - # Run all the tests in a particular test file - $ pytest tests/fields/test_fields.py - # Run only particular test class in that file - $ pytest tests/fields/test_fields.py::TestField - Community ========= - `MongoEngine Users mailing list diff --git a/docs/changelog.rst b/docs/changelog.rst index 81a0ce6dc..bcb465a87 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,7 @@ Changelog Development =========== - (Fill this out as you fix issues and develop your features). +- Switch tox to use pytest instead of legacy `python setup.py test` #2804 Changes in 0.28.2 =================