From eb59047a885026bbfa56543f6ed415817ba1eae7 Mon Sep 17 00:00:00 2001 From: Nikita Melentev Date: Mon, 29 Apr 2019 03:45:58 +0300 Subject: [PATCH] setup.py: add test dependencies via "extras" (#66) --- README.md | 12 ++++++++++++ setup.py | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 540edbe..f3533d5 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,18 @@ only linters and the ones you have already installed on your machine: $ tox -e flake8,pylint,bandit,py27,py36 ``` +Or just install project in developer mode with test dependencies: + +``` bash +$ pip install -e path/to/PySnooper[tests] +``` + +And run tests: + +``` bash +$ pytest +``` + Tests should pass before you push your code. They will be run again on Travis CI. # License # diff --git a/setup.py b/setup.py index 3c7f1b5..e01e6e6 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,12 @@ setuptools.setup( url='https://github.com/cool-RR/PySnooper', packages=setuptools.find_packages(exclude=['tests']), install_requires=read_file('requirements.in'), + extras_require={ + 'tests': { + 'pytest', + 'python-toolbox', + }, + }, classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers',