Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Dec 15, 2015
1 parent 3f7433f commit 0ee55a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions run_tests.py
Expand Up @@ -49,6 +49,22 @@ def test_sorted_incorrectly(self):
self.assertEqual(ret[0][1], 0)
self.assertEqual(ret[0][2], 'I001 found unsorted imports')

def test_isortcfg_found(self):
# _given_a_file_in_test_dir already creates an .isort.cfg file
file_path = self._given_a_file_in_test_dir(
'from sys import pid\n'
'import threading',
isort_config='force_single_line=True'
)
with OutputCapture():
checker = Flake8Isort(None, file_path)
checker.isort_config = True
ret = list(checker.run())
self.assertEqual(len(ret), 1)
self.assertEqual(ret[0][0], 0)
self.assertEqual(ret[0][1], 0)
self.assertEqual(ret[0][2], 'I001 found unsorted imports')


if __name__ == '__main__':
unittest.main()

0 comments on commit 0ee55a4

Please sign in to comment.