py3 fixes

This commit is contained in:
holger krekel 2013-02-04 16:07:51 +01:00
parent 06ab38a2fc
commit 9d107523a1
3 changed files with 8 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class TagTracer:
content = " ".join(map(str, args))
indent = " " * self.indent
lines = [
"%s%s [%s]\n" %(indent, content, ":".join(tags))
]
@ -345,7 +345,10 @@ def importplugin(importspec):
#if str(e).find(name) == -1:
# raise
pass #
__import__(importspec)
try:
__import__(importspec)
except ImportError:
raise ImportError(importspec)
return sys.modules[importspec]
class MultiCall:

View File

@ -3,7 +3,8 @@ import subprocess
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:
def __init__(self, request):

View File

@ -380,7 +380,7 @@ def test_runtest_in_module_ordering(testdir):
def test_outcomeexception_exceptionattributes():
outcome = runner.OutcomeException('test')
assert outcome.message == outcome.msg
assert outcome.args[0] == outcome.msg
def test_pytest_exit():
try: