Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Feb 16, 2016
1 parent e7250cd commit 5b8c314
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def test_sorted_incorrectly(self):
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')
self.assertEqual(
ret[0][2],
'I001 isort found changes, run it on the file'
)

def test_isortcfg_found(self):
# _given_a_file_in_test_dir already creates an .isort.cfg file
Expand All @@ -65,7 +68,10 @@ def test_isortcfg_found(self):
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')
self.assertEqual(
ret[0][2],
'I001 isort found changes, run it on the file'
)

def test_isortcfg_not_found(self):
file_path = self._given_a_file_in_test_dir(
Expand All @@ -85,7 +91,11 @@ def test_isortcfg_not_found(self):
self.assertEqual(len(ret), 1)
self.assertEqual(ret[0][0], 0)
self.assertEqual(ret[0][1], 0)
self.assertEqual(ret[0][2], 'I002 no .isort.cfg file found')
self.assertEqual(
ret[0][2],
'I002 no configuration found (.isort.cfg or [isort] on '
'setup.cfg)'
)

def test_default_option(self):
"""By default a config file (.isort.cfg) is expected"""
Expand Down

0 comments on commit 5b8c314

Please sign in to comment.