Skip to content

Commit

Permalink
skip horace tests if pace_neutrons is not installed, which happens du…
Browse files Browse the repository at this point in the history
…ring the conda build as package is not on conda
  • Loading branch information
nvaytet committed Dec 12, 2024
1 parent 4d6afb0 commit 4d3813f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ test:

{# Conda does not allow spaces between package name and version, so remove them #}
{% for package in test_dependencies %}
{% if package != "pace_neutrons" %}
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %}
{% endif %}
{% endfor %}
# Note that we add tof here because it depends on plopp, and plopp should not be in
# basetest.in because of the nightly dependencies
Expand Down
5 changes: 4 additions & 1 deletion tests/io/sqw/sqw_horace_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from typing import Any

import numpy as np
import pace_neutrons
import pytest
import scipp as sc
from dateutil.parser import parse as parse_datetime
Expand All @@ -25,9 +24,13 @@
SqwLineProj,
)

pytest.importorskip("pace_neutrons")


@pytest.fixture(scope="module")
def matlab() -> Any:
import pace_neutrons

try:
return pace_neutrons.Matlab()
except RuntimeError as e:
Expand Down

0 comments on commit 4d3813f

Please sign in to comment.