From 8f2fd8ffc039f45a8daaedd62e6a2ca9af2542f6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 20 Nov 2019 20:26:45 -0300 Subject: [PATCH] Add develop instructions to CONTRIBUTING From: https://github.com/pytest-dev/pytest/pull/6244 --- .gitignore | 1 + CONTRIBUTING.rst | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index 27bd93c7b..fc61c6ee6 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ dist/ issue/ env/ .env/ +.venv/ 3rdparty/ .tox .cache diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 8e59191ab..a3ae731e4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -262,6 +262,19 @@ Here is a simple overview, with pytest-specific bits: When committing, ``pre-commit`` will re-format the files if necessary. +#. If instead of using ``tox`` you prefer to run the tests directly, then we suggest to create a virtual environment and use + an editable install with the ``testing`` extra:: + + $ python3 -m venv .venv + $ source .venv/bin/activate # Linux + $ .venv/Scripts/activate.bat # Windows + $ pip install -e ".[testing]" + + Afterwards, you can edit the files and run pytest normally:: + + $ pytest testing/test_config.py + + #. Commit and push once your tests pass and you are happy with your change(s):: $ git commit -a -m ""