apply most other hooks and opt out of black reformating
This commit is contained in:
parent
b60376dc28
commit
86fc31db8d
|
@ -1,10 +1,10 @@
|
||||||
|
exclude: doc/en/example/py2py3/test_py2.py
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/ambv/black
|
- repo: https://github.com/ambv/black
|
||||||
rev: 18.4a4
|
rev: 18.4a4
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--safe, --quiet]
|
args: [--safe, --quiet, --check]
|
||||||
python_version: python3.6
|
python_version: python3.6
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v1.2.3
|
rev: v1.2.3
|
||||||
|
|
|
@ -23,7 +23,7 @@ a full list of details. A few feature highlights:
|
||||||
called if the corresponding setup method succeeded.
|
called if the corresponding setup method succeeded.
|
||||||
|
|
||||||
- integrate tab-completion on command line options if you
|
- integrate tab-completion on command line options if you
|
||||||
have `argcomplete <https://pypi.org/project/argcomplete/>`_
|
have `argcomplete <http://pypi.python.org/pypi/argcomplete>`_
|
||||||
configured.
|
configured.
|
||||||
|
|
||||||
- allow boolean expression directly with skipif/xfail
|
- allow boolean expression directly with skipif/xfail
|
||||||
|
|
|
@ -154,7 +154,7 @@ This makes use of the automatic caching mechanisms of pytest.
|
||||||
Another good approach is by adding the data files in the ``tests`` folder.
|
Another good approach is by adding the data files in the ``tests`` folder.
|
||||||
There are also community plugins available to help managing this aspect of
|
There are also community plugins available to help managing this aspect of
|
||||||
testing, e.g. `pytest-datadir <https://github.com/gabrielcnr/pytest-datadir>`__
|
testing, e.g. `pytest-datadir <https://github.com/gabrielcnr/pytest-datadir>`__
|
||||||
and `pytest-datafiles <https://pypi.org/project/pytest-datafiles/>`__.
|
and `pytest-datafiles <https://pypi.python.org/pypi/pytest-datafiles>`__.
|
||||||
|
|
||||||
.. _smtpshared:
|
.. _smtpshared:
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
from __future__ import print_function
|
||||||
import textwrap
|
import textwrap
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
class Writer(object):
|
class Writer(object):
|
||||||
def __init__(self, clsname):
|
def __init__(self, clsname):
|
||||||
self.clsname = clsname
|
self.clsname = clsname
|
||||||
|
@ -11,7 +13,7 @@ class Writer(object):
|
||||||
|
|
||||||
def __exit__(self, *args):
|
def __exit__(self, *args):
|
||||||
self.file.close()
|
self.file.close()
|
||||||
print "wrote", self.file.name
|
print("wrote", self.file.name)
|
||||||
|
|
||||||
def line(self, line):
|
def line(self, line):
|
||||||
self.file.write(line + "\n")
|
self.file.write(line + "\n")
|
||||||
|
@ -30,6 +32,7 @@ class Writer(object):
|
||||||
self.line(w.fill(doc))
|
self.line(w.fill(doc))
|
||||||
self.line("")
|
self.line("")
|
||||||
|
|
||||||
|
|
||||||
def pytest_funcarg__a(request):
|
def pytest_funcarg__a(request):
|
||||||
with Writer("request") as writer:
|
with Writer("request") as writer:
|
||||||
writer.docmethod(request.getfixturevalue)
|
writer.docmethod(request.getfixturevalue)
|
||||||
|
@ -37,5 +40,6 @@ def pytest_funcarg__a(request):
|
||||||
writer.docmethod(request.addfinalizer)
|
writer.docmethod(request.addfinalizer)
|
||||||
writer.docmethod(request.applymarker)
|
writer.docmethod(request.applymarker)
|
||||||
|
|
||||||
|
|
||||||
def test_hello(a):
|
def test_hello(a):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -15,4 +15,3 @@ pageTracker._trackPageview();
|
||||||
} catch(err) {}</script>
|
} catch(err) {}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ pageTracker._trackPageview();
|
||||||
} catch(err) {}</script>
|
} catch(err) {}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ pageTracker._trackPageview();
|
||||||
} catch(err) {}</script>
|
} catch(err) {}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ pageTracker._trackPageview();
|
||||||
} catch(err) {}</script>
|
} catch(err) {}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue