summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_al.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-03-03 04:19:29 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-03-03 04:19:29 (GMT)
commit7dbd91811d87b75cb43441ed6e356232bcf60d28 (patch)
tree8a6d0ac4e7c4adb7e724a1274e24d83f5b8e7481 /Lib/test/test_al.py
parent963c80fd45d8c94d15ea4085ce200365018a1556 (diff)
downloadcpython-7dbd91811d87b75cb43441ed6e356232bcf60d28.zip
cpython-7dbd91811d87b75cb43441ed6e356232bcf60d28.tar.gz
cpython-7dbd91811d87b75cb43441ed6e356232bcf60d28.tar.bz2
Add test_main() functions to various tests where it was simple to do. Done so
that regrtest can execute the test_main() directly instead of relying on import side-effects.
Diffstat (limited to 'Lib/test/test_al.py')
-rwxr-xr-xLib/test/test_al.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_al.py b/Lib/test/test_al.py
index 02876f0..54496c1 100755
--- a/Lib/test/test_al.py
+++ b/Lib/test/test_al.py
@@ -11,7 +11,7 @@ alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getpara
# This is a very unobtrusive test for the existence of the al module and all its
# attributes. More comprehensive examples can be found in Demo/al
-def main():
+def test_main():
# touch all the attributes of al without doing anything
if verbose:
print 'Touching al module attributes...'
@@ -20,4 +20,6 @@ def main():
print 'touching: ', attr
getattr(al, attr)
-main()
+
+if __name__ == '__main__':
+ test_main()