diff --git a/main.py b/main.py index 6f6156f..08d0189 100644 --- a/main.py +++ b/main.py @@ -90,6 +90,10 @@ test_status ), f"Test {test["test_name"]} does not end with {test_status}" +# Ensure the results are JSON serializable. +import json +check = json.dumps(actual_results) + # Create a div to display the results in the page. page.append( div( diff --git a/upytest.py b/upytest.py index 10ed88f..b0d60ec 100644 --- a/upytest.py +++ b/upytest.py @@ -130,7 +130,7 @@ def __init__(self, test_function, module_name, test_name, function_id): and the unique Python id of the test function. """ self.test_function = test_function - self.module_name = module_name + self.module_name = str(module_name) self.test_name = test_name self.function_id = function_id self.status = PENDING # the initial state of the test.