def test_print_warning(self): p = DummyPty() c = Console(p) c.warning('this is a warning') self.assertIn('this is a warning', p.get_output())