py3 fixes
This commit is contained in:
parent
06ab38a2fc
commit
9d107523a1
|
@ -33,7 +33,7 @@ class TagTracer:
|
||||||
|
|
||||||
content = " ".join(map(str, args))
|
content = " ".join(map(str, args))
|
||||||
indent = " " * self.indent
|
indent = " " * self.indent
|
||||||
|
|
||||||
lines = [
|
lines = [
|
||||||
"%s%s [%s]\n" %(indent, content, ":".join(tags))
|
"%s%s [%s]\n" %(indent, content, ":".join(tags))
|
||||||
]
|
]
|
||||||
|
@ -345,7 +345,10 @@ def importplugin(importspec):
|
||||||
#if str(e).find(name) == -1:
|
#if str(e).find(name) == -1:
|
||||||
# raise
|
# raise
|
||||||
pass #
|
pass #
|
||||||
__import__(importspec)
|
try:
|
||||||
|
__import__(importspec)
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError(importspec)
|
||||||
return sys.modules[importspec]
|
return sys.modules[importspec]
|
||||||
|
|
||||||
class MultiCall:
|
class MultiCall:
|
||||||
|
|
|
@ -3,7 +3,8 @@ import subprocess
|
||||||
|
|
||||||
|
|
||||||
def pytest_funcarg__standalone(request):
|
def pytest_funcarg__standalone(request):
|
||||||
return request.cached_setup(scope="module", setup=lambda: Standalone(request))
|
return request.cached_setup(scope="module",
|
||||||
|
setup=lambda: Standalone(request))
|
||||||
|
|
||||||
class Standalone:
|
class Standalone:
|
||||||
def __init__(self, request):
|
def __init__(self, request):
|
||||||
|
|
|
@ -380,7 +380,7 @@ def test_runtest_in_module_ordering(testdir):
|
||||||
|
|
||||||
def test_outcomeexception_exceptionattributes():
|
def test_outcomeexception_exceptionattributes():
|
||||||
outcome = runner.OutcomeException('test')
|
outcome = runner.OutcomeException('test')
|
||||||
assert outcome.message == outcome.msg
|
assert outcome.args[0] == outcome.msg
|
||||||
|
|
||||||
def test_pytest_exit():
|
def test_pytest_exit():
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue