parent
f640e0cb04
commit
3fabc4d219
|
@ -582,7 +582,7 @@ class FormattedExcinfo(object):
|
||||||
filelocrepr = ReprFileLocation(path, entry.lineno+1, message)
|
filelocrepr = ReprFileLocation(path, entry.lineno+1, message)
|
||||||
localsrepr = None
|
localsrepr = None
|
||||||
if not short:
|
if not short:
|
||||||
localsrepr = self.repr_locals(entry.locals)
|
localsrepr = self.repr_locals(entry.locals)
|
||||||
return ReprEntry(lines, reprargs, localsrepr, filelocrepr, style)
|
return ReprEntry(lines, reprargs, localsrepr, filelocrepr, style)
|
||||||
if excinfo:
|
if excinfo:
|
||||||
lines.extend(self.get_exconly(excinfo, indent=4))
|
lines.extend(self.get_exconly(excinfo, indent=4))
|
||||||
|
@ -854,7 +854,7 @@ class ReprFuncArgs(TerminalRepr):
|
||||||
if len(ns) + len(linesofar) + 2 > tw.fullwidth:
|
if len(ns) + len(linesofar) + 2 > tw.fullwidth:
|
||||||
if linesofar:
|
if linesofar:
|
||||||
tw.line(linesofar)
|
tw.line(linesofar)
|
||||||
linesofar = ns
|
linesofar = ns
|
||||||
else:
|
else:
|
||||||
if linesofar:
|
if linesofar:
|
||||||
linesofar += ", " + ns
|
linesofar += ", " + ns
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Source(object):
|
||||||
after = Source(after)
|
after = Source(after)
|
||||||
newsource = Source()
|
newsource = Source()
|
||||||
lines = [(indent + line) for line in self.lines]
|
lines = [(indent + line) for line in self.lines]
|
||||||
newsource.lines = before.lines + lines + after.lines
|
newsource.lines = before.lines + lines + after.lines
|
||||||
return newsource
|
return newsource
|
||||||
|
|
||||||
def indent(self, indent=' ' * 4):
|
def indent(self, indent=' ' * 4):
|
||||||
|
|
|
@ -818,7 +818,7 @@ class DropShorterLongHelpFormatter(argparse.HelpFormatter):
|
||||||
action._formatted_action_invocation = orgstr
|
action._formatted_action_invocation = orgstr
|
||||||
return orgstr
|
return orgstr
|
||||||
return_list = []
|
return_list = []
|
||||||
option_map = getattr(action, 'map_long_option', {})
|
option_map = getattr(action, 'map_long_option', {})
|
||||||
if option_map is None:
|
if option_map is None:
|
||||||
option_map = {}
|
option_map = {}
|
||||||
short_long = {}
|
short_long = {}
|
||||||
|
|
|
@ -105,10 +105,10 @@ def add_funcarg_pseudo_fixture_def(collector, metafunc, fixturemanager):
|
||||||
if node and argname in node._name2pseudofixturedef:
|
if node and argname in node._name2pseudofixturedef:
|
||||||
arg2fixturedefs[argname] = [node._name2pseudofixturedef[argname]]
|
arg2fixturedefs[argname] = [node._name2pseudofixturedef[argname]]
|
||||||
else:
|
else:
|
||||||
fixturedef = FixtureDef(fixturemanager, '', argname,
|
fixturedef = FixtureDef(fixturemanager, '', argname,
|
||||||
get_direct_param_fixture_func,
|
get_direct_param_fixture_func,
|
||||||
arg2scope[argname],
|
arg2scope[argname],
|
||||||
valuelist, False, False)
|
valuelist, False, False)
|
||||||
arg2fixturedefs[argname] = [fixturedef]
|
arg2fixturedefs[argname] = [fixturedef]
|
||||||
if node is not None:
|
if node is not None:
|
||||||
node._name2pseudofixturedef[argname] = fixturedef
|
node._name2pseudofixturedef[argname] = fixturedef
|
||||||
|
|
|
@ -347,11 +347,11 @@ class TestSession(object):
|
||||||
assert rcol.fspath == subdir
|
assert rcol.fspath == subdir
|
||||||
parts = rcol._parsearg(p.basename)
|
parts = rcol._parsearg(p.basename)
|
||||||
|
|
||||||
assert parts[0] == target
|
assert parts[0] == target
|
||||||
assert len(parts) == 1
|
assert len(parts) == 1
|
||||||
parts = rcol._parsearg(p.basename + "::test_func")
|
parts = rcol._parsearg(p.basename + "::test_func")
|
||||||
assert parts[0] == target
|
assert parts[0] == target
|
||||||
assert parts[1] == "test_func"
|
assert parts[1] == "test_func"
|
||||||
assert len(parts) == 2
|
assert len(parts) == 2
|
||||||
|
|
||||||
def test_collect_topdir(self, testdir):
|
def test_collect_topdir(self, testdir):
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -196,6 +196,6 @@ filterwarnings =
|
||||||
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731
|
ignore = E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude = _pytest/vendored_packages/pluggy.py
|
exclude = _pytest/vendored_packages/pluggy.py
|
||||||
|
|
Loading…
Reference in New Issue