Skip to content
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