json2graph.tests.test_main

OntoUML JSON2Graph Test Module.

This module contains test functions to verify the correctness of the OntoUML JSON2Graph software. The tests are based on the comparison of the generated graph (from OntoUML JSON files provided in the test folder) with the expected resulting graph stored in Turtle (.ttl) files (also provided in the test folder).

The module uses a list of test files (LIST_OF_TESTS) retrieved from the function get_test_list(). Each test file is a valid OntoUML JSON file representing a model.

The comparison of graphs is done using the function compare_graphs, which should be defined and available for the tests to run successfully.

The tests will ensure the correct functioning of the OntoUML JSON2Graph software and raise an assertion error if the generated graph does not match the expected graph.

Module Contents

Functions

test_ontouml_json2graph(input_file)

Main test function the OntoUML JSON2Graph software.

Attributes

LIST_OF_TESTS

json2graph.tests.test_main.LIST_OF_TESTS
json2graph.tests.test_main.test_ontouml_json2graph(input_file)

Main test function the OntoUML JSON2Graph software.

The test is based on the comparison of the generated graph (from a JSON file provided in the test folder) with an expected resulting graph (also provided in the test folder), always in ‘ttl’ format.

Parameters:

input_file (str) – Path to the JSON file to be tested.

Return type:

None