Skip to content

Commit

Permalink
Add a test for skip functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Sep 15, 2020
1 parent d34620a commit 48081a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/test_pylama_isort.py
Expand Up @@ -17,3 +17,8 @@ def test_run(self, src_dir, tmpdir):
incorrect = tmpdir.join("incorrect.py")
incorrect.write("import b\nimport a\n")
assert self.instance.run(str(incorrect))

def test_skip(self, src_dir, tmpdir):
incorrect = tmpdir.join("incorrect.py")
incorrect.write("# isort: skip_file\nimport b\nimport a\n")
assert not self.instance.run(str(incorrect))

0 comments on commit 48081a9

Please sign in to comment.