Skip to content

Commit

Permalink
test: add test for excluding top-level dir without prefix or suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
b-kamphorst committed May 11, 2023
1 parent 739b9d4 commit f1a3295
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit/core/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,13 @@ def test_discover_files_exclude_dir(self, isdir):
self.assertEqual([], self.manager.files_list)
self.assertEqual(["./x/y.py"], self.manager.excluded_files)

# Test exclude dir without prefix or suffix
# Test exclude top-level dir without prefix or suffix
isdir.side_effect = [True, False]
self.manager.discover_files(["./x/y/z.py"], True, "x")
self.assertEqual([], self.manager.files_list)
self.assertEqual(["./x/y/z.py"], self.manager.excluded_files)

# Test exclude lower-level dir without prefix or suffix
isdir.side_effect = [False, False]
self.manager.discover_files(["./x/y/z.py"], True, "y")
self.assertEqual([], self.manager.files_list)
Expand Down

0 comments on commit f1a3295

Please sign in to comment.