fairseq/data/plasma_utils.py

Killed 1 out of 13 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 178

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -18,7 +18,7 @@
     def __init__(self, array):
         super().__init__()
         self.array = array
-        self.disable = array.nbytes < 134217728  # disable for arrays <128MB
+        self.disable = array.nbytes <= 134217728  # disable for arrays <128MB
         self.object_id = None
         self.path = None
 

Mutant 179

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -18,7 +18,7 @@
     def __init__(self, array):
         super().__init__()
         self.array = array
-        self.disable = array.nbytes < 134217728  # disable for arrays <128MB
+        self.disable = array.nbytes < 134217729  # disable for arrays <128MB
         self.object_id = None
         self.path = None
 

Mutant 180

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -18,7 +18,7 @@
     def __init__(self, array):
         super().__init__()
         self.array = array
-        self.disable = array.nbytes < 134217728  # disable for arrays <128MB
+        self.disable = None  # disable for arrays <128MB
         self.object_id = None
         self.path = None
 

Mutant 181

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -19,7 +19,7 @@
         super().__init__()
         self.array = array
         self.disable = array.nbytes < 134217728  # disable for arrays <128MB
-        self.object_id = None
+        self.object_id = ""
         self.path = None
 
         # variables with underscores shouldn't be pickled

Mutant 182

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -20,7 +20,7 @@
         self.array = array
         self.disable = array.nbytes < 134217728  # disable for arrays <128MB
         self.object_id = None
-        self.path = None
+        self.path = ""
 
         # variables with underscores shouldn't be pickled
         self._client = None

Mutant 183

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -23,7 +23,7 @@
         self.path = None
 
         # variables with underscores shouldn't be pickled
-        self._client = None
+        self._client = ""
         self._server = None
         self._server_tmp = None
         self._plasma = None

Mutant 184

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -24,7 +24,7 @@
 
         # variables with underscores shouldn't be pickled
         self._client = None
-        self._server = None
+        self._server = ""
         self._server_tmp = None
         self._plasma = None
 

Mutant 185

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -25,7 +25,7 @@
         # variables with underscores shouldn't be pickled
         self._client = None
         self._server = None
-        self._server_tmp = None
+        self._server_tmp = ""
         self._plasma = None
 
     @property

Mutant 186

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -26,7 +26,7 @@
         self._client = None
         self._server = None
         self._server_tmp = None
-        self._plasma = None
+        self._plasma = ""
 
     @property
     def plasma(self):

Mutant 187

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -28,7 +28,6 @@
         self._server_tmp = None
         self._plasma = None
 
-    @property
     def plasma(self):
         if self._plasma is None and not self.disable:
             try:

Mutant 188

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -51,7 +51,6 @@
             '-s', self.path,
         ])
 
-    @property
     def client(self):
         if self._client is None:
             assert self.path is not None

Mutant 189

--- fairseq/data/plasma_utils.py
+++ fairseq/data/plasma_utils.py
@@ -79,7 +79,7 @@
         self.array = self.client.get(self.object_id)
 
     def __del__(self):
-        if self._server is not None:
+        if self._server is  None:
             self._server.kill()
             self._server = None
             self._server_tmp.close()