I'm using unittest for some testing in Python. I have a simple test:
self.assertEqual(stdout, expected_stdout)
that really just checks the equality of two strings.
When I run it I get an AssertionError, which is fine, but I'm not sure what the +/- below it mean. Example:
FAIL: unittest.case.FunctionTestCase (basic_test4)
actually pretty irrelevant
----------------------------------------------------------------------
Traceback (most recent call last):
File "/h/u16/c4/00/chenjoh6/csc209_advance_prep_ta/209-materials/assignments/a2/file-archive/20179/testing/a2_fs.py", line 33, in inner_meth_
simple_test(["asd"], tc.dict_of_tests[name][1], tc.dict_of_tests[name][2] ,tc.dict_of_tests[name][0])(tfs)
File "/h/u16/c4/00/chenjoh6/csc209_advance_prep_ta/209-materials/autotesting/20179/test_helpers.py", line 111, in _t
self.assertEqual(stderr, expected_stderr)
AssertionError: 'or is it here(null)This is problemjohn\njohn: Success\n' != 'or is it here(null)john: Success\n'
+ or is it here(null)john: Success
- or is it here(null)This is problemjohn
- john: Success
(The first part to the left of the != is the actual output, the second part to the right of the != is the expected).
Can anyone help me understand how to read the +/-? Thanks
\n