Skip to content

Commit

Permalink
Fix bug in Tests.test_case for Python 2.5 and 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleyayers committed Apr 23, 2012
1 parent 02dec7a commit 0df0e09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions attest/collectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ def test_case(self):
if not name:
name = "unnamed"
if not name.startswith("test_"):
name = "test_{}".format(name)
name = "test_%s" % (name, )
count = counts.increment(name)
if count > 1:
name = "{}_{}".format(name, count)
name = "%s_%s" % (name, count)
methods[name] = staticmethod(func)
return type("Tests", (TestCase, ), methods)

Expand Down

0 comments on commit 0df0e09

Please sign in to comment.