some test fixes and configure tox-testing against pytest==2.3.5 and pytest>=2.4.2

This commit is contained in:
holger krekel
2013-10-04 10:34:24 +02:00
parent a9aca9a3ae
commit b88b23e358
8 changed files with 46 additions and 28 deletions

View File

@@ -1,2 +1,2 @@
#
__version__ = '1.9dev2'
__version__ = '1.9'

View File

@@ -177,13 +177,13 @@ def report_collection_diff(from_collection, to_collection, from_id, to_id):
fromfile=from_id,
tofile=to_id,
)
error_message = (
u'Different tests were collected between {from_id} and {to_id}. '
u'The difference is:\n'
u'{diff}'
error_message = py.builtin._totext(
'Different tests were collected between {from_id} and {to_id}. '
'The difference is:\n'
'{diff}'
).format(from_id=from_id, to_id=to_id, diff='\n'.join(diff))
raise AssertionError(error_message)
msg = "\n".join([x.rstrip() for x in error_message.split("\n")])
raise AssertionError(msg)
class Interrupted(KeyboardInterrupt):

View File

@@ -128,7 +128,7 @@ if __name__ == '__channelexec__':
# python3.2 is not concurrent import safe, so let's play it safe
# https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32
if sys.version_info[:2] == (3,2):
os.environ["PYTHONDONTWRITEBYTECODE"] = 1
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
slaveinput,args,option_dict = channel.receive()
importpath = os.getcwd()
sys.path.insert(0, importpath) # XXX only for remote situations