Skip to content

Commit

Permalink
Use import-mode=importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
jl-wynen committed Jan 26, 2024
1 parent cbbfcf4 commit 1203ab5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ minversion = "7.0"
addopts = """
--strict-config
--strict-markers
--import-mode=importlib
-ra
-v
-m 'not externalfile'
Expand Down
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

import os
import sys
from pathlib import Path
from typing import Any, List

import pytest
import scipp as sc

# Silence warning from Jupyter
os.environ['JUPYTER_PLATFORM_DIRS'] = '1'
# To import helper modules
sys.path.insert(0, str(Path(__file__).resolve().parent))

pytest.register_assert_rewrite('scipp.testing.assertions')

Expand Down
3 changes: 1 addition & 2 deletions tests/load_files_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
from typing import Any, Dict, Optional, Union

import externalfile
import pytest
import scipp as sc

import scippnexus as snx

externalfile = pytest.importorskip('externalfile')

all_files = [
'2023/DREAM_baseline_all_dets.nxs',
'2023/BIFROST_873855_00000015.hdf',
Expand Down

0 comments on commit 1203ab5

Please sign in to comment.