summaryrefslogtreecommitdiff
path: root/nose
diff options
context:
space:
mode:
authorAlex Stewart <alex@foogod.com>2010-08-31 11:22:14 -0700
committerAlex Stewart <alex@foogod.com>2010-08-31 11:22:14 -0700
commit101930a350ceea38242b292cc9f1a5db95ecde04 (patch)
treee4020da5684c750eaa966672f0bd6829d905aa5a /nose
parentbbe7ec73479aeac7e69623d7e4fa3d6fc92a8988 (diff)
downloadnose-101930a350ceea38242b292cc9f1a5db95ecde04.tar.gz
More Py3 fixups: created setup3lib, added pyversion_patching to build_tests
Diffstat (limited to 'nose')
-rw-r--r--nose/plugins/errorclass.py2
-rw-r--r--nose/plugins/testid.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/nose/plugins/errorclass.py b/nose/plugins/errorclass.py
index e29c3ca..663dffc 100644
--- a/nose/plugins/errorclass.py
+++ b/nose/plugins/errorclass.py
@@ -83,7 +83,7 @@ Errors and failures are empty, but todo has our test:
----------------------------------------------------------------------
Traceback (most recent call last):
...
- Todo: I need to test something
+ ...Todo: I need to test something
<BLANKLINE>
Since we defined a Todo as a failure, the run was not successful.
diff --git a/nose/plugins/testid.py b/nose/plugins/testid.py
index 4d3321c..113e471 100644
--- a/nose/plugins/testid.py
+++ b/nose/plugins/testid.py
@@ -100,7 +100,7 @@ from nose.plugins import Plugin
from nose.util import src, set
try:
- from cPickle import dump, load
+ from pickle import dump, load
except ImportError:
from pickle import dump, load
@@ -160,10 +160,10 @@ class TestId(Plugin):
if result.wasSuccessful():
self.failed = []
if self.collecting:
- ids = dict(zip(self.tests.values(), self.tests.keys()))
+ ids = dict(list(zip(list(self.tests.values()), list(self.tests.keys()))))
else:
ids = self.ids
- fh = open(self.idfile, 'w')
+ fh = open(self.idfile, 'wb')
dump({'ids': ids,
'failed': self.failed,
'source_names': self.source_names}, fh)
@@ -177,7 +177,7 @@ class TestId(Plugin):
"""
log.debug('ltfn %s %s', names, module)
try:
- fh = open(self.idfile, 'r')
+ fh = open(self.idfile, 'rb')
data = load(fh)
if 'ids' in data:
self.ids = data['ids']
@@ -190,7 +190,7 @@ class TestId(Plugin):
self.source_names = names
if self.ids:
self.id = max(self.ids) + 1
- self.tests = dict(zip(self.ids.values(), self.ids.keys()))
+ self.tests = dict(list(zip(list(self.ids.values()), list(self.ids.keys()))))
else:
self.id = 1
log.debug(