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
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue