Fix linting issues.
This commit is contained in:
parent
8801162275
commit
0b70477930
|
@ -1 +1 @@
|
|||
Added the `--trace` option to enter the debugger at the start of a test.
|
||||
Added the `--trace` option to enter the debugger at the start of a test.
|
||||
|
|
|
@ -174,7 +174,7 @@ for example::
|
|||
.. _trace-option:
|
||||
|
||||
Dropping to PDB_ (Python Debugger) at the start of a test
|
||||
-----------------------------------------------
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
``pytest`` allows one to drop into the PDB_ prompt immediately at the start of each test via a command line option::
|
||||
|
|
|
@ -85,11 +85,11 @@ def pytest_pyfunc_call(pyfuncitem):
|
|||
if pyfuncitem._isyieldedfunction():
|
||||
pyfuncitem.args = [testfunction, pyfuncitem._args]
|
||||
else:
|
||||
if 'func' in pyfuncitem._fixtureinfo.argnames:
|
||||
if "func" in pyfuncitem._fixtureinfo.argnames:
|
||||
raise ValueError("--trace can't be used with a fixture named func!")
|
||||
pyfuncitem.funcargs['func'] = testfunction
|
||||
pyfuncitem.funcargs["func"] = testfunction
|
||||
new_list = list(pyfuncitem._fixtureinfo.argnames)
|
||||
new_list.append('func')
|
||||
new_list.append("func")
|
||||
pyfuncitem._fixtureinfo.argnames = tuple(new_list)
|
||||
yield
|
||||
|
||||
|
|
|
@ -697,7 +697,7 @@ class TestDebuggingBreakpoints(object):
|
|||
assert "reading from stdin while output" not in rest
|
||||
TestPDB.flush(child)
|
||||
|
||||
class TestTraceOption():
|
||||
class TestTraceOption:
|
||||
def test_trace_sets_breakpoint(self, testdir):
|
||||
p1 = testdir.makepyfile(
|
||||
"""
|
||||
|
@ -712,4 +712,4 @@ class TestTraceOption():
|
|||
rest = child.read().decode("utf8")
|
||||
assert "1 passed" in rest
|
||||
assert "reading from stdin while output" not in rest
|
||||
TestPDB.flush(child)
|
||||
TestPDB.flush(child)
|
||||
|
|
Loading…
Reference in New Issue