diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-05-22 20:27:25 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-05-22 20:27:25 (GMT) |
commit | 67246127553cc69b97d13753de1d8d0c9bfffd66 (patch) | |
tree | db6eff9e8b8b400ddb6f6390a44a73948b002cac /Lib/test/test_weakset.py | |
parent | 66d53fa9ad846a401292eec622a6a98983bed578 (diff) | |
download | cpython-67246127553cc69b97d13753de1d8d0c9bfffd66.zip cpython-67246127553cc69b97d13753de1d8d0c9bfffd66.tar.gz cpython-67246127553cc69b97d13753de1d8d0c9bfffd66.tar.bz2 |
add test for inequality
Diffstat (limited to 'Lib/test/test_weakset.py')
-rw-r--r-- | Lib/test/test_weakset.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py index 4d3878f..5b782da 100644 --- a/Lib/test/test_weakset.py +++ b/Lib/test/test_weakset.py @@ -340,6 +340,12 @@ class TestWeakSet(unittest.TestCase): self.assertFalse(self.s == WeakSet([Foo])) self.assertFalse(self.s == 1) + def test_ne(self): + self.assertTrue(self.s != set(self.items)) + s1 = WeakSet() + s2 = WeakSet() + self.assertFalse(s1 != s2) + def test_weak_destroy_while_iterating(self): # Issue #7105: iterators shouldn't crash when a key is implicitly removed # Create new items to be sure no-one else holds a reference |