'Integration test to assert that results are not dropped when coala is
ran multiple times with caching enabled and one section yields a result
and second one doesn\'t.'

def test_caching_multi_results(self):

    filename = 'tests/misc/test_caching_multi_results/'
    with bear_test_module():
        with simulate_console_inputs('n'):
            (retval, stdout, stderr) = execute_coala(coala.main, 'coala', '-c', (filename + '.coafile'), '-f', (filename + 'test.py'))
            self.assertIn('This    file    has', stdout)
            self.assertIn("Implicit    'Default'    section    inheritance    is    deprecated", stderr)
        (retval, stdout, stderr) = execute_coala(coala.main, 'coala', '--non-interactive', '--no-color', '-c', (filename + '.coafile'), '-f', (filename + 'test.py'))
        self.assertIn('This    file    has', stdout)
        self.assertEqual(2, len(stderr.splitlines()))
        self.assertIn('LineCountTestBear:    This    result    has    no    patch    attached.', stderr)
        self.assertIn("Implicit    'Default'    section    inheritance    is    deprecated", stderr)
