about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--parse_data.py24
2 files changed, 26 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5c90153..c5e2afa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-report.html
\ No newline at end of file
+report.html
+__pycache__
\ No newline at end of file
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