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:
Neal Norwitz 2003-02-17 14:51:41 +00:00
parent 9e5d87fa20
commit 996acf122d
6 changed files with 38 additions and 10 deletions

View file

@ -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()