diff options
Diffstat (limited to 'parse_data.py')
| -rw-r--r-- | parse_data.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/parse_data.py b/parse_data.py new file mode 100644 index 0000000..92fa038 --- /dev/null +++ b/parse_data.py @@ -0,0 +1,24 @@ + +class Category: + failed = False + tests = [] + + def __init__(self, name: str): + self.name = name + + def is_number_in_tests(self, number: int) -> bool: + return self.tests[-1] == number + + def add_test(self, log_type: str, number: int, timestamp: str, description: str, fail_message: str): + # TODO + # adds the test to the tests-list. if the test is a fail, the whole category also fails. + # if the test number is already registered (as a fail), add this fail_message to the messages of that test + pass + +def find_category_in_data(name: str, data: list[Category]) -> int: + # TODO + # returns the index of the category with the same name in data + # return -1, if the category cannot be found + return -1 + +data = [] # List of Category objects \ No newline at end of file |