From 7e2f66adc38f3609b805ee006e0987b678f731de Mon Sep 17 00:00:00 2001 From: Skylar Downes Date: Tue, 27 Sep 2016 12:51:46 -0700 Subject: [PATCH] Create existingtestsuite.rst --- doc/en/existingtestsuite.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/en/existingtestsuite.rst diff --git a/doc/en/existingtestsuite.rst b/doc/en/existingtestsuite.rst new file mode 100644 index 000000000..96ce6339c --- /dev/null +++ b/doc/en/existingtestsuite.rst @@ -0,0 +1,32 @@ +Using pytest with an existing test suite +=========================================== + +Pytest can be used with most existing test suites, but it's +behavior differs from other test runners such as :ref:`nose` or +Python's default unittest framework. + +Before using this section you will want to :ref:`getting-started `. + +Running an existing test suite with pytest +--------------------------------------------- + +Say you want to contribute to an existing repository somewhere. +After pulling the code into your development space using some +flavor of version control and (optionally) setting up a virtualenv +you will want to run:: + + cd + pip install -e . # Environment dependent alternatives include + # 'python setup.py develop' and 'conda develop' + +in your project root. This will set up a symlink to your code in +site-packages, allowing you to edit your code while your tests +run against it as if it were installed. + +Setting up your project in development mode lets you avoid having to +reinstall every time you want to run your tests, and is less brittle than +mucking about with sys.path to point your tests at local code. + +Also consider using Tox - https://tox.readthedocs.io/en/latest/ + +.. include:: links.inc