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

@ -38,6 +38,8 @@ class NetrcTestCase(unittest.TestCase):
self.assert_(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1'))
self.assert_(self.netrc.hosts['default'] == ('log2', None, 'pass2'))
def test_main():
test_support.run_unittest(NetrcTestCase)
if __name__ == "__main__":
test_support.run_unittest(NetrcTestCase)
test_main()