Commit d7e8e344 authored by Benjamin Peterson's avatar Benjamin Peterson

don't let sys.argv be used in the tests

parent 829f6b80
......@@ -3085,6 +3085,7 @@ class Test_TestProgram(TestCase):
def test_NonExit(self):
program = unittest.main(exit=False,
argv=["foobar"],
testRunner=unittest.TextTestRunner(stream=StringIO()),
testLoader=self.FooBarLoader())
self.assertTrue(hasattr(program, 'result'))
......@@ -3094,6 +3095,7 @@ class Test_TestProgram(TestCase):
self.assertRaises(
SystemExit,
unittest.main,
argv=["foobar"],
testRunner=unittest.TextTestRunner(stream=StringIO()),
exit=True,
testLoader=self.FooBarLoader())
......@@ -3103,6 +3105,7 @@ class Test_TestProgram(TestCase):
self.assertRaises(
SystemExit,
unittest.main,
argv=["foobar"],
testRunner=unittest.TextTestRunner(stream=StringIO()),
testLoader=self.FooBarLoader())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment