Skip to content

Commit

Permalink
Move convenience assert function to sweet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
baoilleach committed Mar 18, 2009
1 parent 8d1f20c commit 42c8975
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions PR2691618.py
Expand Up @@ -89,8 +89,6 @@ def setUp(self):
{'bo': 1},
{'bo': 1},
{'bo': 1}]}
def assertInList(self, item, mylist):
self.assertTrue(item in mylist, "Item %s not found in %s" % (item, mylist))
def testIdentity(self):
self.assertSameMol(self.mol, self.serialised)
def testRoundTrip(self):
Expand Down
3 changes: 3 additions & 0 deletions sweet.py
Expand Up @@ -61,6 +61,9 @@ def assertInside(self, first, second, error, msg=None):
if not (second-error) < first < (second+error):
raise self.failureException, (msg or '%r != %r (+-%r)' % (first,second,error))

def assertInList(self, item, mylist):
self.assertTrue(item in mylist, "Item %s not found in %s" % (item, mylist))

def cont_assertEqual(self, a, b, c):
"""Replace an assertEqual with a cont_assertEqual to allow
execution of additional tests in the same assertSameMol"""
Expand Down

0 comments on commit 42c8975

Please sign in to comment.