cleverhans/devtools/list_files.py
Killed 14 out of 24 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 16
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -3,7 +3,7 @@
import cleverhans
-def list_files(suffix=""):
+def list_files(suffix="XXXX"):
"""
Returns a list of all files in CleverHans with the given suffix.
Mutant 19
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -21,7 +21,7 @@
cleverhans_path = os.path.abspath(cleverhans.__path__[0])
# In some environments cleverhans_path does not point to a real directory.
# In such case return empty list.
- if not os.path.isdir(cleverhans_path):
+ if os.path.isdir(cleverhans_path):
return []
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
Mutant 22
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -26,7 +26,7 @@
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
- extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
+ extra_dirs = ['XXcleverhans_tutorialsXX', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
for extra_dir in extra_dirs:
extra_path = os.path.join(repo_path, extra_dir)
Mutant 23
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -26,7 +26,7 @@
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
- extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
+ extra_dirs = ['cleverhans_tutorials', 'XXexamplesXX', 'scripts', 'tests_tf', 'tests_pytorch']
for extra_dir in extra_dirs:
extra_path = os.path.join(repo_path, extra_dir)
Mutant 24
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -26,7 +26,7 @@
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
- extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
+ extra_dirs = ['cleverhans_tutorials', 'examples', 'XXscriptsXX', 'tests_tf', 'tests_pytorch']
for extra_dir in extra_dirs:
extra_path = os.path.join(repo_path, extra_dir)
Mutant 25
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -26,7 +26,7 @@
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
- extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
+ extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'XXtests_tfXX', 'tests_pytorch']
for extra_dir in extra_dirs:
extra_path = os.path.join(repo_path, extra_dir)
Mutant 26
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -26,7 +26,7 @@
repo_path = os.path.abspath(os.path.join(cleverhans_path, os.pardir))
file_list = _list_files(cleverhans_path, suffix)
- extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'tests_pytorch']
+ extra_dirs = ['cleverhans_tutorials', 'examples', 'scripts', 'tests_tf', 'XXtests_pytorchXX']
for extra_dir in extra_dirs:
extra_path = os.path.join(repo_path, extra_dir)
Mutant 33
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -38,7 +38,7 @@
return file_list
-def _list_files(path, suffix=""):
+def _list_files(path, suffix="XXXX"):
"""
Returns a list of all files ending in `suffix` contained within `path`.
Mutant 38
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -65,7 +65,7 @@
flattened.append(elem)
return flattened
else:
- assert os.path.exists(path), "couldn't find file '%s'" % path
+ assert os.path.exists(path), "XXcouldn't find file '%s'XX" % path
if path.endswith(suffix):
return [path]
return []
Mutant 39
--- cleverhans/devtools/list_files.py
+++ cleverhans/devtools/list_files.py
@@ -65,7 +65,7 @@
flattened.append(elem)
return flattened
else:
- assert os.path.exists(path), "couldn't find file '%s'" % path
+ assert os.path.exists(path), "couldn't find file '%s'" / path
if path.endswith(suffix):
return [path]
return []