aboutsummaryrefslogtreecommitdiff
path: root/src/test/captured.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/captured.py')
-rw-r--r--src/test/captured.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/test/captured.py b/src/test/captured.py
index e47590b..b42352e 100644
--- a/src/test/captured.py
+++ b/src/test/captured.py
@@ -6,12 +6,13 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:16:25 by charles #+# #+# #
-# Updated: 2020/09/11 12:16:51 by charles ### ########.fr #
+# Updated: 2020/09/11 20:08:00 by charles ### ########.fr #
# #
# ############################################################################ #
import config
+
class Captured:
def __init__(self, output: str, status: int, files_content: [str], is_timeout: bool = False):
lines = output.split('\n')
@@ -27,13 +28,13 @@ class Captured:
self.files_content = files_content
self.is_timeout = is_timeout
- def __eq__(self, other: 'Result') -> bool:
+ def __eq__(self, other: 'Captured') -> bool:
if self.is_timeout:
return self.is_timeout == other.is_timeout
- return (self.output == other.output and
- self.status == other.status and
- all([x == y for x, y in zip(self.files_content, other.files_content)]))
+ return (self.output == other.output
+ and self.status == other.status
+ and all([x == y for x, y in zip(self.files_content, other.files_content)]))
@staticmethod
def timeout():
- return Captured("", 0, [], is_timeout = True)
+ return Captured("", 0, [], is_timeout=True)