def test_assert_output(self):
        def f():
            print('abc')
            print('123')
            sys.stderr.writelines(['def\n', '456\n'])

        self.assertOutput('abc\n123\n', 'def\n456\n', f)