|
@@ -7,6 +7,7 @@ from garden_layer import GardenLayer
|
|
|
from garden_layer.config import CLONE_OF, GRAPH, KEROSENE_ROOT, MCP_URL
|
|
from garden_layer.config import CLONE_OF, GRAPH, KEROSENE_ROOT, MCP_URL
|
|
|
|
|
|
|
|
CYCLE_2026_3 = "http://world.eu.org/example1#ProductionCycle_21d96b6c-179"
|
|
CYCLE_2026_3 = "http://world.eu.org/example1#ProductionCycle_21d96b6c-179"
|
|
|
|
|
+FIXTURE_FILES = ["ganja_test_fixture.ttl"]
|
|
|
|
|
|
|
|
|
|
|
|
|
def pytest_report_header(config):
|
|
def pytest_report_header(config):
|
|
@@ -20,6 +21,15 @@ def garden_layer():
|
|
|
layer.traverse(KEROSENE_ROOT, CLONE_OF, direction="incoming", limit=1)
|
|
layer.traverse(KEROSENE_ROOT, CLONE_OF, direction="incoming", limit=1)
|
|
|
except requests.RequestException as exc:
|
|
except requests.RequestException as exc:
|
|
|
pytest.skip(f"Cannot reach MCP server: {exc}")
|
|
pytest.skip(f"Cannot reach MCP server: {exc}")
|
|
|
|
|
+ if os.getenv("MCP_ALLOW_EXAMPLE_LOAD", "false").lower() == "true":
|
|
|
|
|
+ try:
|
|
|
|
|
+ layer.load_examples(files=FIXTURE_FILES, graph=GRAPH)
|
|
|
|
|
+ except Exception as exc:
|
|
|
|
|
+ pytest.skip(f"Cannot load garden fixtures: {exc}")
|
|
|
|
|
+ result = layer.traverse(KEROSENE_ROOT, CLONE_OF, direction="incoming", limit=1)
|
|
|
|
|
+ bindings = result.get("results", {}).get("bindings", [])
|
|
|
|
|
+ if not bindings:
|
|
|
|
|
+ pytest.skip("No garden fixture data available; set MCP_ALLOW_EXAMPLE_LOAD=true")
|
|
|
return layer
|
|
return layer
|
|
|
|
|
|
|
|
|
|
|