def test__pytest_runtest_logreport__skips_empty_line_for_first_test(self): fake_self = FakeSelf() pytest_runtest_logreport(fake_self, FakeReport('Test::Second::test_example_demo')) with self.assertRaises(AssertionError): fake_self._tw.write.assert_has_calls([call.line(), call.line()])