From d17f016195a7cae60dd982ae97f2d617ba97193c Mon Sep 17 00:00:00 2001 From: baugetfa Date: Tue, 2 Dec 2025 16:05:42 +0100 Subject: [PATCH 1/2] test: disabled test with Lpy dependencies --- conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index 15eac79..11bc4c5 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -50,7 +50,7 @@ test: - test/data/** commands: - cd test - - pytest -v --ignore=test_stat.py + - pytest -v --ignore=test_stat.py --ignore=test_parsing_axialtree.py about: home: {{ home }} From 7f2b22f98730a0e5218a72d91d039eb7158824f8 Mon Sep 17 00:00:00 2001 From: pradal Date: Tue, 2 Dec 2025 17:14:47 +0100 Subject: [PATCH 2/2] Run pytest only if openalea.lpy is present --- test/test_parsing_axialtree.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/test_parsing_axialtree.py b/test/test_parsing_axialtree.py index 553e307..3496122 100644 --- a/test/test_parsing_axialtree.py +++ b/test/test_parsing_axialtree.py @@ -1,7 +1,17 @@ from openalea.mtg.io import axialtree2mtg, mtg2mss , lpy2mtg, mtg2lpy -from openalea.lpy import AxialTree, generateScene, Lsystem from openalea.plantgl.all import Scene, Viewer -from path import Path as path +from pathlib import Path as path + +import pytest + +try: + from openalea.lpy import AxialTree, generateScene, Lsystem + WITH_LPY = True +except ImportError: + WITH_LPY = False + +if not WITH_LPY: + pytest.skip("openalea.lpy not available", allow_module_level=True) def str2mtg(s): #s = s.replace('N', 'F')