Allow temporary hashability for the __contains__ test.

(Requested by Alex Martelli.)
This commit is contained in:
Raymond Hettinger 2003-11-21 18:36:54 +00:00
parent 3fbec701ca
commit 19c2d77842
2 changed files with 19 additions and 1 deletions

View file

@ -35,6 +35,8 @@ class TestJointOps(unittest.TestCase):
for c in self.letters:
self.assertEqual(c in self.s, c in self.d)
self.assertRaises(TypeError, self.s.__contains__, [[]])
s = self.thetype([frozenset(self.letters)])
self.assert_(self.thetype(self.letters) in s)
def test_copy(self):
dup = self.s.copy()