fairseq/model_parallel/models/__init__.py
Killed 7 out of 15 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 3315
--- 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 3316
--- 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 3317
--- 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 3318
--- 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 3319
--- 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 3320
--- 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 3321
--- 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 3327
--- 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