diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 20:18:37 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 20:18:37 +0200 |
| commit | 2ffd95c295b117053f6e5430ba3ccc72beb224aa (patch) | |
| tree | fd61d882314bb09f0250ee55caeedd1101938bca /src/test/captured.py | |
| parent | 43be3d890eb37bef2f336bbc64e362a06bebe8ac (diff) | |
| download | minishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.tar.gz minishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.tar.bz2 minishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.zip | |
Linting with flake8
Diffstat (limited to 'src/test/captured.py')
| -rw-r--r-- | src/test/captured.py | 13 |
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) |
