31 lines
906 B
Python
31 lines
906 B
Python
|
|
"""Phase 5 RDF Converter tests.
|
||
|
|
|
||
|
|
Tests RDF ↔ Property Graph conversion:
|
||
|
|
- Triple to node/edge conversion
|
||
|
|
- Graph roundtrip integrity
|
||
|
|
"""
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
from ont_platform.core.graph import RDFToPropertyGraphConverter
|
||
|
|
|
||
|
|
|
||
|
|
class TestRDFConverter:
|
||
|
|
"""Test RDF to Property Graph conversion."""
|
||
|
|
|
||
|
|
def test_converter_init(self):
|
||
|
|
"""Test converter initialization."""
|
||
|
|
converter = RDFToPropertyGraphConverter()
|
||
|
|
assert converter is not None
|
||
|
|
|
||
|
|
def test_converter_has_required_methods(self):
|
||
|
|
"""Test that converter has required methods."""
|
||
|
|
converter = RDFToPropertyGraphConverter()
|
||
|
|
assert hasattr(converter, 'convert_triples_to_graph')
|
||
|
|
assert hasattr(converter, 'to_rdf_triples')
|
||
|
|
assert callable(converter.convert_triples_to_graph)
|
||
|
|
assert callable(converter.to_rdf_triples)
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
pytest.main([__file__, "-v"])
|