Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test___all__.py @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | ff96a313cd1c |
| children | 218cdd6c6842 6768b2350c57 |
| rev | line source |
|---|---|
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
1 import unittest |
|
49099
ff96a313cd1c
warnings.catch_warnings() now returns a list or None instead of the custom
Brett Cannon <bcannon@gmail.com>
parents:
47316
diff
changeset
|
2 from test.test_support import run_unittest |
|
16070
b5345e99596b
added __all__ lists to a number of Python modules
Skip Montanaro <skip@pobox.com>
parents:
diff
changeset
|
3 import sys |
|
22954
9a58e97db447
Ignore more deprecation warnings.
Tim Peters <tim.peters@gmail.com>
parents:
21297
diff
changeset
|
4 import warnings |
|
9a58e97db447
Ignore more deprecation warnings.
Tim Peters <tim.peters@gmail.com>
parents:
21297
diff
changeset
|
5 |
|
46701
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
6 |
|
16070
b5345e99596b
added __all__ lists to a number of Python modules
Skip Montanaro <skip@pobox.com>
parents:
diff
changeset
|
7 |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
8 class AllTest(unittest.TestCase): |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
9 |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
10 def check_all(self, modname): |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
11 names = {} |
|
49099
ff96a313cd1c
warnings.catch_warnings() now returns a list or None instead of the custom
Brett Cannon <bcannon@gmail.com>
parents:
47316
diff
changeset
|
12 with warnings.catch_warnings(): |
|
46817
d0f4c24668f2
Also ignore package deprecations.
Brett Cannon <bcannon@gmail.com>
parents:
46701
diff
changeset
|
13 warnings.filterwarnings("ignore", ".* (module|package)", |
|
d0f4c24668f2
Also ignore package deprecations.
Brett Cannon <bcannon@gmail.com>
parents:
46701
diff
changeset
|
14 DeprecationWarning) |
|
46701
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
15 try: |
|
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
16 exec "import %s" % modname in names |
|
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
17 except ImportError: |
|
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
18 # Silent fail here seems the best route since some modules |
|
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
19 # may not be available in all environments. |
|
0c2e4b55f80b
When testing a module's __all__, we really don't care if it is deprecated.
Brett Cannon <bcannon@gmail.com>
parents:
45468
diff
changeset
|
20 return |
|
41380
586a7e877500
Stop using test_support.verify().
Collin Winter <collinw@gmail.com>
parents:
40614
diff
changeset
|
21 self.failUnless(hasattr(sys.modules[modname], "__all__"), |
|
586a7e877500
Stop using test_support.verify().
Collin Winter <collinw@gmail.com>
parents:
40614
diff
changeset
|
22 "%s has no __all__ attribute" % modname) |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
23 names = {} |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
24 exec "from %s import *" % modname in names |
|
41380
586a7e877500
Stop using test_support.verify().
Collin Winter <collinw@gmail.com>
parents:
40614
diff
changeset
|
25 if "__builtins__" in names: |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
26 del names["__builtins__"] |
|
30929
54ff68e973ee
* Migrate set() and frozenset() from the sandbox.
Raymond Hettinger <python@rcn.com>
parents:
30875
diff
changeset
|
27 keys = set(names) |
|
54ff68e973ee
* Migrate set() and frozenset() from the sandbox.
Raymond Hettinger <python@rcn.com>
parents:
30875
diff
changeset
|
28 all = set(sys.modules[modname].__all__) |
|
41380
586a7e877500
Stop using test_support.verify().
Collin Winter <collinw@gmail.com>
parents:
40614
diff
changeset
|
29 self.assertEqual(keys, all) |
|
16070
b5345e99596b
added __all__ lists to a number of Python modules
Skip Montanaro <skip@pobox.com>
parents:
diff
changeset
|
30 |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
31 def test_all(self): |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
32 if not sys.platform.startswith('java'): |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
33 # In case _socket fails to build, make this test fail more gracefully |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
34 # than an AttributeError somewhere deep in CGIHTTPServer. |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
35 import _socket |
|
19119
600a9a2b7a18
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
18994
diff
changeset
|
36 |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
37 self.check_all("BaseHTTPServer") |
|
28923
83533016c289
Added missing modules to __all__ check.
Raymond Hettinger <python@rcn.com>
parents:
28922
diff
changeset
|
38 self.check_all("Bastion") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
39 self.check_all("CGIHTTPServer") |
|
47252
e534ee0a4cd0
ConfigParser renaming reversal part 3: move module into place and adapt imports.
Georg Brandl <georg@python.org>
parents:
47248
diff
changeset
|
40 self.check_all("ConfigParser") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
41 self.check_all("Cookie") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
42 self.check_all("MimeWriter") |
|
47248
9acb314b9072
Queue renaming reversal part 3: move module into place and
Georg Brandl <georg@python.org>
parents:
47241
diff
changeset
|
43 self.check_all("Queue") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
44 self.check_all("SimpleHTTPServer") |
|
47241
ba1fa511b72d
socketserver renaming reversal part 3: move the module into the right
Georg Brandl <georg@python.org>
parents:
47221
diff
changeset
|
45 self.check_all("SocketServer") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
46 self.check_all("StringIO") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
47 self.check_all("UserString") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
48 self.check_all("aifc") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
49 self.check_all("atexit") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
50 self.check_all("audiodev") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
51 self.check_all("base64") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
52 self.check_all("bdb") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
53 self.check_all("binhex") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
54 self.check_all("calendar") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
55 self.check_all("cgi") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
56 self.check_all("cmd") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
57 self.check_all("code") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
58 self.check_all("codecs") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
59 self.check_all("codeop") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
60 self.check_all("colorsys") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
61 self.check_all("commands") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
62 self.check_all("compileall") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
63 self.check_all("copy") |
|
47189
f419b2e96a98
Revert copy_reg -> copyreg rename.
Georg Brandl <georg@python.org>
parents:
47108
diff
changeset
|
64 self.check_all("copy_reg") |
|
29064
8e92f2e2bda9
All two more modules with __all__.
Raymond Hettinger <python@rcn.com>
parents:
28923
diff
changeset
|
65 self.check_all("csv") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
66 self.check_all("dbhash") |
|
32452
67fbc23dcfdd
Move Decimal from the sandbox into production.
Raymond Hettinger <python@rcn.com>
parents:
32337
diff
changeset
|
67 self.check_all("decimal") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
68 self.check_all("difflib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
69 self.check_all("dircache") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
70 self.check_all("dis") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
71 self.check_all("doctest") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
72 self.check_all("dummy_thread") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
73 self.check_all("dummy_threading") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
74 self.check_all("filecmp") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
75 self.check_all("fileinput") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
76 self.check_all("fnmatch") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
77 self.check_all("fpformat") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
78 self.check_all("ftplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
79 self.check_all("getopt") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
80 self.check_all("getpass") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
81 self.check_all("gettext") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
82 self.check_all("glob") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
83 self.check_all("gzip") |
|
32337
bc9ae44b2ce4
Add heapq to list of __all__ checks.
Raymond Hettinger <python@rcn.com>
parents:
30929
diff
changeset
|
84 self.check_all("heapq") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
85 self.check_all("htmllib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
86 self.check_all("httplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
87 self.check_all("ihooks") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
88 self.check_all("imaplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
89 self.check_all("imghdr") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
90 self.check_all("imputil") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
91 self.check_all("keyword") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
92 self.check_all("linecache") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
93 self.check_all("locale") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
94 self.check_all("macpath") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
95 self.check_all("macurl2path") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
96 self.check_all("mailbox") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
97 self.check_all("mailcap") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
98 self.check_all("mhlib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
99 self.check_all("mimetools") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
100 self.check_all("mimetypes") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
101 self.check_all("mimify") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
102 self.check_all("multifile") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
103 self.check_all("netrc") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
104 self.check_all("nntplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
105 self.check_all("ntpath") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
106 self.check_all("opcode") |
|
29064
8e92f2e2bda9
All two more modules with __all__.
Raymond Hettinger <python@rcn.com>
parents:
28923
diff
changeset
|
107 self.check_all("optparse") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
108 self.check_all("os") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
109 self.check_all("os2emxpath") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
110 self.check_all("pdb") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
111 self.check_all("pickle") |
|
33917
25714e0fc89d
Essentially SF patch 1061679: add missing __all__ to pickletools.py.
Tim Peters <tim.peters@gmail.com>
parents:
32883
diff
changeset
|
112 self.check_all("pickletools") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
113 self.check_all("pipes") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
114 self.check_all("popen2") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
115 self.check_all("poplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
116 self.check_all("posixpath") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
117 self.check_all("pprint") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
118 self.check_all("profile") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
119 self.check_all("pstats") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
120 self.check_all("pty") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
121 self.check_all("py_compile") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
122 self.check_all("pyclbr") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
123 self.check_all("quopri") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
124 self.check_all("random") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
125 self.check_all("re") |
|
47221
9fbc41abdd4b
Revert the renaming of repr to reprlib.
Brett Cannon <bcannon@gmail.com>
parents:
47189
diff
changeset
|
126 self.check_all("repr") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
127 self.check_all("rexec") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
128 self.check_all("rfc822") |
|
28923
83533016c289
Added missing modules to __all__ check.
Raymond Hettinger <python@rcn.com>
parents:
28922
diff
changeset
|
129 self.check_all("rlcompleter") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
130 self.check_all("robotparser") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
131 self.check_all("sched") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
132 self.check_all("sets") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
133 self.check_all("sgmllib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
134 self.check_all("shelve") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
135 self.check_all("shlex") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
136 self.check_all("shutil") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
137 self.check_all("smtpd") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
138 self.check_all("smtplib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
139 self.check_all("sndhdr") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
140 self.check_all("socket") |
|
28923
83533016c289
Added missing modules to __all__ check.
Raymond Hettinger <python@rcn.com>
parents:
28922
diff
changeset
|
141 self.check_all("_strptime") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
142 self.check_all("symtable") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
143 self.check_all("tabnanny") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
144 self.check_all("tarfile") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
145 self.check_all("telnetlib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
146 self.check_all("tempfile") |
|
47316
c5604be7acdf
add __all__ to test_support
Benjamin Peterson <benjamin@python.org>
parents:
47252
diff
changeset
|
147 self.check_all("test.test_support") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
148 self.check_all("textwrap") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
149 self.check_all("threading") |
|
28923
83533016c289
Added missing modules to __all__ check.
Raymond Hettinger <python@rcn.com>
parents:
28922
diff
changeset
|
150 self.check_all("timeit") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
151 self.check_all("toaiff") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
152 self.check_all("tokenize") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
153 self.check_all("traceback") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
154 self.check_all("tty") |
|
30434
1725470d0d43
Test __all__ for unittest.py
Raymond Hettinger <python@rcn.com>
parents:
29712
diff
changeset
|
155 self.check_all("unittest") |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
156 self.check_all("urllib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
157 self.check_all("urlparse") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
158 self.check_all("uu") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
159 self.check_all("warnings") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
160 self.check_all("wave") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
161 self.check_all("weakref") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
162 self.check_all("webbrowser") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
163 self.check_all("xdrlib") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
164 self.check_all("zipfile") |
|
25681
ba522c74a931
Add special consideration for rlcompleter. As a side effect of
Guido van Rossum <guido@python.org>
parents:
24442
diff
changeset
|
165 |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
166 # rlcompleter needs special consideration; it import readline which |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
167 # initializes GNU readline which calls setlocale(LC_CTYPE, "")... :-( |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
168 try: |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
169 self.check_all("rlcompleter") |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
170 finally: |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
171 try: |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
172 import locale |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
173 except ImportError: |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
174 pass |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
175 else: |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
176 locale.setlocale(locale.LC_CTYPE, 'C') |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
177 |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
178 |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
179 def test_main(): |
|
41380
586a7e877500
Stop using test_support.verify().
Collin Winter <collinw@gmail.com>
parents:
40614
diff
changeset
|
180 run_unittest(AllTest) |
|
28611
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
181 |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
182 if __name__ == "__main__": |
|
c71b9ba1f04c
Port test_pwd.py to PyUnit. Check that getpwall() and
Walter Dörwald <walter@livinglogic.de>
parents:
25681
diff
changeset
|
183 test_main() |
