Skip to content

Commit

Permalink
Merge pull request #188 from launchableinc/ENG-50-fix-parse-glob
Browse files Browse the repository at this point in the history
add check wildcard characters are contained or not
  • Loading branch information
Konboi authored Apr 8, 2021
2 parents c9fec26 + 5212888 commit a3a0945
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions launchable/commands/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ def separator(self, s: str):
self._separator = s

def test_path(self, path: TestPathLike):
if isinstance(path, str) and any(s in path for s in ('/**', '**/', '*.', "/*")):
for i in glob.iglob(path, recursive=True):
if os.path.isdir(i):
continue

self.test_path(i)
return

"""register one test"""
self.test_paths.append(self.to_test_path(path))

Expand Down

0 comments on commit a3a0945

Please sign in to comment.