Today I wrote a test and no matter what I did I couldn't pass the test.
then I discovered that I get SystemExit: False even without any test cases :
>>> ================================ RESTART ================================
>>> import unittest
>>> unittest.main()
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Traceback (most recent call last):
File "<pyshell#123>", line 1, in <module>
unittest.main()
File "C:\Python27x64\Lib\unittest\main.py", line 95, in __init__
self.runTests()
File "C:\Python27x64\Lib\unittest\main.py", line 231, in runTests
sys.exit(not self.result.wasSuccessful())
SystemExit: False
Is this behavior normal? also:
>>> class aTest(unittest.TestCase):
def test_123(self):
self.assertEqual(2, 1+1)
>>> unittest.main()
.
----------------------------------------------------------------------
Ran 1 test in 0.011s
OK
Traceback (most recent call last):
File "<pyshell#133>", line 1, in <module>
unittest.main()
File "C:\Python27x64\Lib\unittest\main.py", line 95, in __init__
self.runTests()
File "C:\Python27x64\Lib\unittest\main.py", line 231, in runTests
sys.exit(not self.result.wasSuccessful())
SystemExit: False