ucoProject / UCO

This repository is for development of the Unified Cyber Ontology.
Apache License 2.0
73 stars 34 forks source link

Clarify synchronization test output #528

Closed ajnelson-nist closed 1 year ago

ajnelson-nist commented 1 year ago

PR 527 stumbled on a code synchronization issue that we'd left a unit test to catch, back in Issue 435. On reviewing the debug output against a freshly encountered error, the original implementer (myself) deems it ...

test_uco_monolithic.py:232: AssertionError
-------------------- Captured log call --------------------
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:224 Match
[...snip...]
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:226 n2ecb5139feab4fe88096d056f9ba80cab1564
DEBUG    root:test_uco_monolithic.py:227 n2ecb5139feab4fe88096d056f9ba80cab2022
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:224 Match
[...snip...]
DEBUG    root:test_uco_monolithic.py:224 Match
DEBUG    root:test_uco_monolithic.py:224 Match
=============== short test summary info ==================
FAILED test_uco_monolithic.py::test_semi_open_vocabulary_owl_shacl_alignment - AssertionError: assert set() == {(rdflib.term...cab')), ...))}

... unhelpful.

This patch series changes the output on encountering a synchronization issue to the following, as encountered in PR 527:

-------------------- Captured log call --------------------
ERROR    root:test_uco_monolithic.py:235 Semi-open vocabulary lists are out of sync.  See:
ERROR    root:test_uco_monolithic.py:237 * https://ontology.unifiedcyberontology.org/uco/types/Hash
=============== short test summary info ==================
FAILED test_uco_monolithic.py::test_semi_open_vocabulary_owl_shacl_alignment - AssertionError: assert set() == {(rdflib.term...cab')), ...))}

This is filed as an independent Pull Request into develop as a bugfix PR, but will be merged into PR 527 rather than develop. All testing is delegated to PR 527.

Coordination