diff --git a/flake8/tests/test_integration.py b/flake8/tests/test_integration.py index 55ace48..d1417c6 100644 --- a/flake8/tests/test_integration.py +++ b/flake8/tests/test_integration.py @@ -8,6 +8,7 @@ except ImportError: import mock # < PY33 from flake8 import engine +from flake8.util import is_windows class IntegrationTestCase(unittest.TestCase): @@ -41,8 +42,15 @@ class IntegrationTestCase(unittest.TestCase): # mock stdout.flush so we can count the number of jobs created with mock.patch('sys.stdout.flush') as mocked: guide, report = self.check_files(arglist=['--jobs=%s' % jobs]) - self.assertEqual(guide.options.jobs, jobs) - self.assertEqual(mocked.call_count, jobs) + if is_windows(): + # The code path where guide.options.jobs gets converted to an + # int is not run on windows. So, do the int conversion here. + self.assertEqual(int(guide.options.jobs), jobs) + # On windows, call count is always zero. + self.assertEqual(mocked.call_count, 0) + else: + self.assertEqual(guide.options.jobs, jobs) + self.assertEqual(mocked.call_count, jobs) def test_jobs(self): self._job_tester(2)