fairseq/models/huggingface/__init__.py
Killed 7 out of 15 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 3231
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -12,7 +12,7 @@
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
if (
- not file.startswith('_')
+ file.startswith('_')
and not file.startswith('.')
and (file.endswith('.py') or os.path.isdir(path))
):
Mutant 3232
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -12,7 +12,7 @@
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
if (
- not file.startswith('_')
+ not file.startswith('XX_XX')
and not file.startswith('.')
and (file.endswith('.py') or os.path.isdir(path))
):
Mutant 3233
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -13,7 +13,7 @@
path = os.path.join(models_dir, file)
if (
not file.startswith('_')
- and not file.startswith('.')
+ and file.startswith('.')
and (file.endswith('.py') or os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
Mutant 3234
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -13,7 +13,7 @@
path = os.path.join(models_dir, file)
if (
not file.startswith('_')
- and not file.startswith('.')
+ and not file.startswith('XX.XX')
and (file.endswith('.py') or os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
Mutant 3235
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -14,7 +14,7 @@
if (
not file.startswith('_')
and not file.startswith('.')
- and (file.endswith('.py') or os.path.isdir(path))
+ and (file.endswith('XX.pyXX') or os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
module = importlib.import_module('fairseq.models.huggingface.' + model_name)
Mutant 3236
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -14,7 +14,7 @@
if (
not file.startswith('_')
and not file.startswith('.')
- and (file.endswith('.py') or os.path.isdir(path))
+ and (file.endswith('.py') and os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
module = importlib.import_module('fairseq.models.huggingface.' + model_name)
Mutant 3237
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -12,8 +12,7 @@
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
if (
- not file.startswith('_')
- and not file.startswith('.')
+ not file.startswith('_') or not file.startswith('.')
and (file.endswith('.py') or os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
Mutant 3243
--- fairseq/models/huggingface/__init__.py
+++ fairseq/models/huggingface/__init__.py
@@ -17,5 +17,5 @@
and (file.endswith('.py') or os.path.isdir(path))
):
model_name = file[:file.find('.py')] if file.endswith('.py') else file
- module = importlib.import_module('fairseq.models.huggingface.' + model_name)
+ module = None