def testPassesGoToFile(self): testlog.logSuccesses = True testlog.assertEqual(4, 4) answer = u'PASSED: testlogger_tests.py line '+str(inspect.getlineno(sys._getframe()) -1)+': testlog.assertEqual(4, 4)\n' self.assertEqual(self.log.getvalue()[28:], answer) testlog.assertEqual(4, 3) answer = u'FAILED: 4 != 3 in testlogger_tests.py line '+str(inspect.getlineno(sys._getframe()) -1)+ ': testlog.assertEqual(4, 3)\n' self.assertEqual(self.log.getvalue()[119:], answer)
def testFailuresGoToFile(self): testlog.assertEqual(4, 3) answer = u'FAILED: 4 != 3 in testlogger_tests.py line '+str(inspect.getlineno(sys._getframe()) -1)+ ': testlog.assertEqual(4, 3)\n' self.assertEqual(self.log.getvalue()[28:], answer)