Example #1
0
 def test_flake(self):
     """
     C{flake} reports a code warning from Pyflakes.  It is exactly the
     str() of a L{pyflakes.messages.Message}.
     """
     out = StringIO()
     reporter = Reporter(out, None)
     message = UnusedImport('foo.py', 42, 'bar')
     reporter.flake(message)
     self.assertEquals(out.getvalue(), "%s\n" % (message, ))
Example #2
0
 def test_flake(self):
     """
     C{flake} reports a code warning from Pyflakes.  It is exactly the
     str() of a L{pyflakes.messages.Message}.
     """
     out = StringIO()
     reporter = Reporter(out, None)
     message = UnusedImport('foo.py', Node(42), 'bar')
     reporter.flake(message)
     self.assertEqual(out.getvalue(), "%s\n" % (message,))
"""