def test_error(self): with redirect_stderr(self.std_err): Log.error('hello') output = self.std_err.getvalue() self.assertEqual('[ERROR] hello\n', output)