summaryrefslogtreecommitdiffstats
path: root/Doc/ext/test.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-08-15 14:27:07 (GMT)
committerGeorg Brandl <georg@python.org>2007-08-15 14:27:07 (GMT)
commit739c01d47b9118d04e5722333f0e6b4d0c8bdd9e (patch)
treef82b450d291927fc1758b96d981aa0610947b529 /Doc/ext/test.py
parent2d1649094402ef393ea2b128ba2c08c3937e6b93 (diff)
downloadcpython-739c01d47b9118d04e5722333f0e6b4d0c8bdd9e.zip
cpython-739c01d47b9118d04e5722333f0e6b4d0c8bdd9e.tar.gz
cpython-739c01d47b9118d04e5722333f0e6b4d0c8bdd9e.tar.bz2
Delete the LaTeX doc tree.
Diffstat (limited to 'Doc/ext/test.py')
-rw-r--r--Doc/ext/test.py213
1 files changed, 0 insertions, 213 deletions
diff --git a/Doc/ext/test.py b/Doc/ext/test.py
deleted file mode 100644
index 7ebf46a..0000000
--- a/Doc/ext/test.py
+++ /dev/null
@@ -1,213 +0,0 @@
-"""Test module for the noddy examples
-
-Noddy 1:
-
->>> import noddy
->>> n1 = noddy.Noddy()
->>> n2 = noddy.Noddy()
->>> del n1
->>> del n2
-
-
-Noddy 2
-
->>> import noddy2
->>> n1 = noddy2.Noddy('jim', 'fulton', 42)
->>> n1.first
-'jim'
->>> n1.last
-'fulton'
->>> n1.number
-42
->>> n1.name()
-'jim fulton'
->>> n1.first = 'will'
->>> n1.name()
-'will fulton'
->>> n1.last = 'tell'
->>> n1.name()
-'will tell'
->>> del n1.first
->>> n1.name()
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n1.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n1.first = 'drew'
->>> n1.first
-'drew'
->>> del n1.number
-Traceback (most recent call last):
-...
-TypeError: can't delete numeric/char attribute
->>> n1.number=2
->>> n1.number
-2
->>> n1.first = 42
->>> n1.name()
-'42 tell'
->>> n2 = noddy2.Noddy()
->>> n2.name()
-' '
->>> n2.first
-''
->>> n2.last
-''
->>> del n2.first
->>> n2.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n2.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n2.name()
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-AttributeError: first
->>> n2.number
-0
->>> n3 = noddy2.Noddy('jim', 'fulton', 'waaa')
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-TypeError: an integer is required
->>> del n1
->>> del n2
-
-
-Noddy 3
-
->>> import noddy3
->>> n1 = noddy3.Noddy('jim', 'fulton', 42)
->>> n1 = noddy3.Noddy('jim', 'fulton', 42)
->>> n1.name()
-'jim fulton'
->>> del n1.first
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-TypeError: Cannot delete the first attribute
->>> n1.first = 42
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-TypeError: The first attribute value must be a string
->>> n1.first = 'will'
->>> n1.name()
-'will fulton'
->>> n2 = noddy3.Noddy()
->>> n2 = noddy3.Noddy()
->>> n2 = noddy3.Noddy()
->>> n3 = noddy3.Noddy('jim', 'fulton', 'waaa')
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-TypeError: an integer is required
->>> del n1
->>> del n2
-
-Noddy 4
-
->>> import noddy4
->>> n1 = noddy4.Noddy('jim', 'fulton', 42)
->>> n1.first
-'jim'
->>> n1.last
-'fulton'
->>> n1.number
-42
->>> n1.name()
-'jim fulton'
->>> n1.first = 'will'
->>> n1.name()
-'will fulton'
->>> n1.last = 'tell'
->>> n1.name()
-'will tell'
->>> del n1.first
->>> n1.name()
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n1.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n1.first = 'drew'
->>> n1.first
-'drew'
->>> del n1.number
-Traceback (most recent call last):
-...
-TypeError: can't delete numeric/char attribute
->>> n1.number=2
->>> n1.number
-2
->>> n1.first = 42
->>> n1.name()
-'42 tell'
->>> n2 = noddy4.Noddy()
->>> n2 = noddy4.Noddy()
->>> n2 = noddy4.Noddy()
->>> n2 = noddy4.Noddy()
->>> n2.name()
-' '
->>> n2.first
-''
->>> n2.last
-''
->>> del n2.first
->>> n2.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n2.first
-Traceback (most recent call last):
-...
-AttributeError: first
->>> n2.name()
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-AttributeError: first
->>> n2.number
-0
->>> n3 = noddy4.Noddy('jim', 'fulton', 'waaa')
-Traceback (most recent call last):
- File "<stdin>", line 1, in ?
-TypeError: an integer is required
-
-
-Test cyclic gc(?)
-
->>> import gc
->>> gc.disable()
-
->>> x = []
->>> l = [x]
->>> n2.first = l
->>> n2.first
-[[]]
->>> l.append(n2)
->>> del l
->>> del n1
->>> del n2
->>> sys.getrefcount(x)
-3
->>> ignore = gc.collect()
->>> sys.getrefcount(x)
-2
-
->>> gc.enable()
-"""
-
-import os
-import sys
-from distutils.util import get_platform
-PLAT_SPEC = "%s-%s" % (get_platform(), sys.version[0:3])
-src = os.path.join("build", "lib.%s" % PLAT_SPEC)
-sys.path.append(src)
-
-if __name__ == "__main__":
- import doctest, __main__
- doctest.testmod(__main__)