Improve test coverage. Hope the test_file changes work the same on windows.
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 77df31b..e26065c 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -606,6 +606,8 @@
def test_iteration(self):
for v in self.set:
self.assert_(v in self.values)
+ setiter = iter(self.set)
+ self.assertEqual(setiter._length_cue(), len(self.set))
def test_pickling(self):
p = pickle.dumps(self.set)
@@ -693,6 +695,16 @@
set('abc')
set(gooditer())
+ def test_changingSizeWhileIterating(self):
+ s = set([1,2,3])
+ try:
+ for i in s:
+ s.update([4])
+ except RuntimeError:
+ pass
+ else:
+ self.fail("no exception when changing size during iteration")
+
#==============================================================================
class TestSetOfSets(unittest.TestCase):