Skip to content

Commit

Permalink
Merge pull request slackapi#725 from derekschrock/pytest_runner
Browse files Browse the repository at this point in the history
Only require pytest_runner if tests are run
  • Loading branch information
seratch authored Jun 19, 2020
2 parents 23d3b8e + be7ad4c commit c09eb25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

tests_require = ["pytest>=5,<6", "pytest-cov>=2,<3", "codecov>=2,<3", "flake8>=3,<4", "black", "psutil"]

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []


class BaseCommand(Command):
"""Base Command"""
Expand Down Expand Up @@ -182,7 +185,7 @@ def run(self):
),
install_requires=["aiohttp>3.5.2,<4.0.0"],
extras_require={"optional": ["aiodns>1.0"]},
setup_requires=["pytest-runner"],
setup_requires=pytest_runner,
test_suite="tests",
tests_require=tests_require,
cmdclass={
Expand Down

0 comments on commit c09eb25

Please sign in to comment.