fairseq/model_parallel/models/__init__.py
Killed 7 out of 15 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 2785
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if file.startswith('_') and not file.startswith('.') 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.model_parallel.models.' + model_name)
Mutant 2786
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if not file.startswith('XX_XX') and not file.startswith('.') 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.model_parallel.models.' + model_name)
Mutant 2787
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if 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
module = importlib.import_module('fairseq.model_parallel.models.' + model_name)
Mutant 2788
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if 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
module = importlib.import_module('fairseq.model_parallel.models.' + model_name)
Mutant 2789
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if not file.startswith('_') and not file.startswith('.') 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.model_parallel.models.' + model_name)
Mutant 2790
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if not file.startswith('_') and not file.startswith('.') 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.model_parallel.models.' + model_name)
Mutant 2791
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -11,7 +11,7 @@
models_dir = os.path.dirname(__file__)
for file in os.listdir(models_dir):
path = os.path.join(models_dir, file)
- if not file.startswith('_') and not file.startswith('.') and (file.endswith('.py') or os.path.isdir(path)):
+ if 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
module = importlib.import_module('fairseq.model_parallel.models.' + model_name)
Mutant 2797
--- fairseq/model_parallel/models/__init__.py
+++ fairseq/model_parallel/models/__init__.py
@@ -13,5 +13,5 @@
path = os.path.join(models_dir, file)
if not file.startswith('_') and not file.startswith('.') 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.model_parallel.models.' + model_name)
+ module = None