mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
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.
This commit is contained in:
parent
963c80fd45
commit
7dbd91811d
9 changed files with 63 additions and 36 deletions
|
@ -66,7 +66,7 @@ clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID',
|
|||
# This is a very inobtrusive test for the existence of the cl
|
||||
# module and all its attributes.
|
||||
|
||||
def main():
|
||||
def test_main():
|
||||
# touch all the attributes of al without doing anything
|
||||
if verbose:
|
||||
print 'Touching cl module attributes...'
|
||||
|
@ -75,4 +75,7 @@ def main():
|
|||
print 'touching: ', attr
|
||||
getattr(cl, attr)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue