Skip to content

Commit

Permalink
Merge pull request #56 from scipp/pytest-importmode
Browse files Browse the repository at this point in the history
Use pytest import-mode=importlib
  • Loading branch information
jl-wynen authored Jan 31, 2024
2 parents 5c239c4 + 56aa40b commit 1e60b9e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ minversion = "7.0"
addopts = """
--strict-config
--strict-markers
--import-mode=importlib
-ra
-v
"""
Expand Down
6 changes: 5 additions & 1 deletion tests/loki/directbeam_test.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
import sys
from pathlib import Path
from typing import Callable, List

import sciline
import scipp as sc
from common import make_params
from scipp.scipy.interpolate import interp1d

import esssans as sans
from esssans.loki.data import get_path
from esssans.types import DimsToKeep, QBins

sys.path.insert(0, str(Path(__file__).resolve().parent))
from common import make_params # noqa: E402


def _get_I0(qbins: sc.Variable) -> sc.Variable:
Iq_theory = sc.io.load_hdf5(get_path('PolyGauss_I0-50_Rg-60.h5'))
Expand Down
6 changes: 5 additions & 1 deletion tests/loki/iofq_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
import sys
from pathlib import Path
from typing import Callable, List

import numpy as np
import pytest
import sciline
import scipp as sc
from common import make_params

import esssans as sans
from esssans.types import (
Expand All @@ -17,6 +18,9 @@
WavelengthBands,
)

sys.path.insert(0, str(Path(__file__).resolve().parent))
from common import make_params # noqa: E402


def loki_providers() -> List[Callable]:
return list(sans.providers + sans.loki.providers)
Expand Down

0 comments on commit 1e60b9e

Please sign in to comment.