Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags for run_tests skip and only were not functional #473

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/pavilion/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,14 @@ def __getattribute__(self, item):
if self.SKIP:
for skip_glob in self.SKIP:
skip_glob = skip_glob.lower()
if (fnmatch.fnmatch(name, skip_glob) or
fnmatch.fnmatch(cname, skip_glob) or
fnmatch.fnmatch(fname, skip_glob)):
if any([skip_glob in nom for nom in (name, cname, fname)]):
return unittest.skip("via cmdline")(attr)
return attr

if self.ONLY:
for only_glob in self.ONLY:
only_glob = only_glob.lower()
if (fnmatch.fnmatch(name, only_glob) or
fnmatch.fnmatch(cname, only_glob) or
fnmatch.fnmatch(fname, only_glob)):
if any([only_glob in nom for nom in (name, cname, fname)]):
return attr
return unittest.skip("via cmdline")(attr)

Expand Down