From 4a4f6b5b01bd6d23c141d51dd9399c36d12d29d9 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 31 Jan 2021 02:38:49 +0100 Subject: Fixing some type error, Added travis ci --- src/test/captured.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/test/captured.py') 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 +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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 -- cgit