summaryrefslogtreecommitdiff
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-07-12 22:55:42 +0000
committerTim Peters <tim.peters@gmail.com>2001-07-12 22:55:42 +0000
commit87b00841259ca1dcb507247239c116b12d266d90 (patch)
treec71ae60d4b92c34a3106283a6fb318d73409c3cb /Lib/test/test_generators.py
parent66bf37b035d37fb498fbc7f4a7870da9913a0444 (diff)
downloadcpython-87b00841259ca1dcb507247239c116b12d266d90.tar.gz
Remove the last remnants of the hacks to worm around leaks.
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 5bad79a6cb..db6d66ffbc 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -435,9 +435,6 @@ Subject: Re: PEP 255: Simple Generators
...
... def __str__(self):
... return self.name
-...
-... def clear(self):
-... self.__dict__.clear()
>>> names = "ABCDEFGHIJKLM"
>>> sets = [disjointSet(name) for name in names]
@@ -594,9 +591,6 @@ arguments are iterable -- a LazyList is the same as a generator to times().
... while i >= len(sofar):
... sofar.append(fetch())
... return sofar[i]
-...
-... def clear(self):
-... self.__dict__.clear()
>>> def m235():
... yield 1
@@ -1344,14 +1338,11 @@ __test__ = {"tut": tutorial_tests,
# so this works as expected in both ways of running regrtest.
def test_main():
import doctest, test_generators
- if 0:
- # Temporary block to help track down leaks. So far, the blame
- # fell mostly on doctest. Later: the only leaks remaining are
- # in fun_tests, and only if you comment out the two LazyList.clear()
- # calls.
- for i in range(10000):
+ if 0: # change to 1 to run forever (to check for leaks)
+ while 1:
doctest.master = None
doctest.testmod(test_generators)
+ print ".",
else:
doctest.testmod(test_generators)