summaryrefslogtreecommitdiff
path: root/doc/en/goodpractices.rst
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2018-06-02 20:29:28 -0700
committerAnthony Sottile <asottile@umich.edu>2018-06-03 07:58:46 -0700
commit0f2d7dc73cb94b141cc49f452b6f10f7a2d1d5cf (patch)
tree5e59994f200e74da40c0957c1dedbbba9304bcf4 /doc/en/goodpractices.rst
parent5c878001eaaf55859c0ae0f0d32b067415592b87 (diff)
downloadpytest-0f2d7dc73cb94b141cc49f452b6f10f7a2d1d5cf.tar.gz
blacken docs
Diffstat (limited to 'doc/en/goodpractices.rst')
-rw-r--r--doc/en/goodpractices.rst24
1 files changed, 13 insertions, 11 deletions
diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst
index 1e22c10f2..2bbd9d0ae 100644
--- a/doc/en/goodpractices.rst
+++ b/doc/en/goodpractices.rst
@@ -214,10 +214,10 @@ Add this to ``setup.py`` file:
from setuptools import setup
setup(
- #...,
- setup_requires=['pytest-runner', ...],
- tests_require=['pytest', ...],
- #...,
+ # ...,
+ setup_requires=["pytest-runner", ...],
+ tests_require=["pytest", ...],
+ # ...,
)
@@ -263,25 +263,27 @@ your own setuptools Test command for invoking pytest.
class PyTest(TestCommand):
- user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
+ user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
- self.pytest_args = ''
+ self.pytest_args = ""
def run_tests(self):
import shlex
- #import here, cause outside the eggs aren't loaded
+
+ # import here, cause outside the eggs aren't loaded
import pytest
+
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
setup(
- #...,
- tests_require=['pytest'],
- cmdclass = {'test': PyTest},
- )
+ # ...,
+ tests_require=["pytest"],
+ cmdclass={"test": PyTest},
+ )
Now if you run::