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/result.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/test/result.py') diff --git a/src/test/result.py b/src/test/result.py index 2ae5e15..3cc268d 100644 --- a/src/test/result.py +++ b/src/test/result.py @@ -6,12 +6,13 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/09/11 12:17:34 by charles #+# #+# # -# Updated: 2021/01/10 15:25:45 by cacharle ### ########.fr # +# Updated: 2021/01/31 02:28:58 by charles ### ########.fr # # # # ############################################################################ # import sys import re +from typing import Match import config from test.captured import Captured @@ -27,7 +28,7 @@ class Result: def __init__( self, cmd: str, - file_names: [str], + file_names: list[str], expected: Captured, actual: Captured, leak_output: str = None @@ -49,9 +50,9 @@ class Result: @staticmethod def leak(cmd: str, captured: Captured): - return Result(cmd, None, None, captured, captured.output) + return Result(cmd, [], None, captured, captured.output) - def _search_leak_kind(self, kind: str) -> int: + def _search_leak_kind(self, kind: str) -> Match: match = re.search( r"==\d+==\s+" + kind + r" lost: (?P[0-9,]+) bytes in [0-9,]+ blocks", self.leak_output -- cgit