about summary refs log tree commit diff stats
path: root/parse_data.py
diff options
context:
space:
mode:
authorChristian Krinitsin <christian.krinitsin@iqmine.de>2025-04-08 10:55:21 +0200
committerChristian Krinitsin <christian.krinitsin@iqmine.de>2025-04-08 10:55:21 +0200
commit44e38436eadc5320e0b08f649103828213ef465f (patch)
tree34e2e63aae343ab5801ed194045b725682484f4f /parse_data.py
parentde990e0f04d6afdc573d30eb9261b12f0300e0ff (diff)
downloadtestreport-44e38436eadc5320e0b08f649103828213ef465f.tar.gz
testreport-44e38436eadc5320e0b08f649103828213ef465f.zip
add public interface for parsing data
Diffstat (limited to 'parse_data.py')
-rw-r--r--parse_data.py24
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