Code in azure python script task:
import unittest
class MySampleTests(unittest.TestCase):
def test_for_200_code(self):
self.assertEqual(200, 200)
if __name__ == '__main__':
unittest.main()
If I enable 'Fail on standard error', then, the output of azure task has got the foll.:
##[error]C:\ProgramData\Anaconda3\python.exe failed with return code: 0
Irrespective of whether the assert fails or passes, I am getting the above error when 'Fail on standard error' is checked. I know that 'Fail on standard error' causes the task to fail if something is written to the stderr.
But in the above simple example, what is the reason for this error? And how to correct this?