def test_fileWithFlakes(self):
        fd = open(self.tempfilepath, 'wb')
        fd.write("import contraband\n".encode('ascii'))
        fd.close()
        d = self.runPyflakes([self.tempfilepath])
        expected = UnusedImport(self.tempfilepath, Node(1), 'contraband')
        self.assertEqual(d, ("%s\n" % expected, '', 1))
When a Python source file has warnings, the return code is non-zero
dataset/ETHPy150Open patrys/PythonChecker/pyflakes/test/test_api.py/IntegrationTests.test_fileWithFlakes