mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Actually run these tests from regrtest.py.
There was no test_main() and the main body was protected by if __name__ == '__main__' so the test didn't happen on import either.
This commit is contained in:
parent
9e5d87fa20
commit
996acf122d
6 changed files with 38 additions and 10 deletions
|
|
@ -56,11 +56,11 @@ def getMIMEMsg(mf):
|
|||
lines = mf.readlines()
|
||||
linecount += len(lines)
|
||||
|
||||
def main():
|
||||
def test_main():
|
||||
f = cStringIO.StringIO(msg)
|
||||
getMIMEMsg(multifile.MultiFile(f))
|
||||
assert boundaries == 2
|
||||
assert linecount == 9
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
test_main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue