parent
195a816522
commit
c9a081d1a3
|
@ -10,7 +10,7 @@ import functools
|
||||||
|
|
||||||
import py
|
import py
|
||||||
|
|
||||||
import _pytest
|
import _pytest
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ def getfuncargnames(function, startindex=None):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info[:2] == (2, 6):
|
if sys.version_info[:2] == (2, 6):
|
||||||
def isclass(object):
|
def isclass(object):
|
||||||
""" Return true if the object is a class. Overrides inspect.isclass for
|
""" Return true if the object is a class. Overrides inspect.isclass for
|
||||||
python 2.6 because it will return True for objects which always return
|
python 2.6 because it will return True for objects which always return
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TestConftestValueAccessGlobal(object):
|
||||||
startdir.ensure("xx", dir=True)
|
startdir.ensure("xx", dir=True)
|
||||||
conftest = ConftestWithSetinitial(startdir)
|
conftest = ConftestWithSetinitial(startdir)
|
||||||
mod, value = conftest._rget_with_confmod("a", startdir)
|
mod, value = conftest._rget_with_confmod("a", startdir)
|
||||||
assert value == 1.5
|
assert value == 1.5
|
||||||
path = py.path.local(mod.__file__)
|
path = py.path.local(mod.__file__)
|
||||||
assert path.dirpath() == basedir.join("adir", "b")
|
assert path.dirpath() == basedir.join("adir", "b")
|
||||||
assert path.purebasename.startswith("conftest")
|
assert path.purebasename.startswith("conftest")
|
||||||
|
@ -151,10 +151,10 @@ def test_setinitial_conftest_subdirs(testdir, name):
|
||||||
conftest = PytestPluginManager()
|
conftest = PytestPluginManager()
|
||||||
conftest_setinitial(conftest, [sub.dirpath()], confcutdir=testdir.tmpdir)
|
conftest_setinitial(conftest, [sub.dirpath()], confcutdir=testdir.tmpdir)
|
||||||
if name not in ('whatever', '.dotdir'):
|
if name not in ('whatever', '.dotdir'):
|
||||||
assert subconftest in conftest._conftestpath2mod
|
assert subconftest in conftest._conftestpath2mod
|
||||||
assert len(conftest._conftestpath2mod) == 1
|
assert len(conftest._conftestpath2mod) == 1
|
||||||
else:
|
else:
|
||||||
assert subconftest not in conftest._conftestpath2mod
|
assert subconftest not in conftest._conftestpath2mod
|
||||||
assert len(conftest._conftestpath2mod) == 0
|
assert len(conftest._conftestpath2mod) == 0
|
||||||
|
|
||||||
def test_conftest_confcutdir(testdir):
|
def test_conftest_confcutdir(testdir):
|
||||||
|
|
|
@ -242,7 +242,7 @@ class TestParser(object):
|
||||||
action='store_true')
|
action='store_true')
|
||||||
parser.parse([])
|
parser.parse([])
|
||||||
help = parser.optparser.format_help()
|
help = parser.optparser.format_help()
|
||||||
assert '--func-args, --doit foo' in help
|
assert '--func-args, --doit foo' in help
|
||||||
|
|
||||||
# testing would be more helpful with all help generated
|
# testing would be more helpful with all help generated
|
||||||
def test_drop_short_help1(self, parser, capsys):
|
def test_drop_short_help1(self, parser, capsys):
|
||||||
|
|
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 = E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731
|
ignore = 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