aboutsummaryrefslogtreecommitdiff
path: root/src/test/captured.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-01-31 02:38:49 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-01-31 02:38:49 +0100
commit4a4f6b5b01bd6d23c141d51dd9399c36d12d29d9 (patch)
tree6cc08bd49decda6f91c8464b95cafc4945214b50 /src/test/captured.py
parent19c93b393853d5ba052904914356147e27813ad0 (diff)
downloadminishell_test-4a4f6b5b01bd6d23c141d51dd9399c36d12d29d9.tar.gz
minishell_test-4a4f6b5b01bd6d23c141d51dd9399c36d12d29d9.tar.bz2
minishell_test-4a4f6b5b01bd6d23c141d51dd9399c36d12d29d9.zip
Fixing some type error, Added travis ci
Diffstat (limited to 'src/test/captured.py')
-rw-r--r--src/test/captured.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/captured.py b/src/test/captured.py
index 4401ddb..9488149 100644
--- a/src/test/captured.py
+++ b/src/test/captured.py
@@ -6,7 +6,7 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:16:25 by charles #+# #+# #
-# Updated: 2021/01/11 22:20:29 by charles ### ########.fr #
+# Updated: 2021/01/31 02:01:30 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -14,7 +14,7 @@ import config
class Captured:
- def __init__(self, output: str, status: int, files_content: [str], is_timeout: bool = False):
+ def __init__(self, output: str, status: int, files_content: list[str], is_timeout: bool = False):
"""Captured class
output: captured content
status: command status
@@ -34,7 +34,9 @@ class Captured:
self.files_content = files_content
self.is_timeout = is_timeout
- def __eq__(self, other: 'Captured') -> bool:
+ def __eq__(self, other: object) -> bool:
+ if not isinstance(other, Captured):
+ raise NotImplementedError
if self.is_timeout:
return self.is_timeout == other.is_timeout
return (self.output == other.output