Skip to content

Commit

Permalink
test_datastore_linesstats.py: Move importorskip earlier
Browse files Browse the repository at this point in the history
The pytest.importorskip must be before local imports, that might to try
to import module like 'panel' that is not available (e.g. in GitHub
Action environment).

While at it, import 'panel' as 'pn' (with .importorskip), like in
other places.
  • Loading branch information
jnareb committed Dec 9, 2024
1 parent f15ad8e commit 0341d79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_datastore_linesstats.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest

hv = pytest.importorskip("holoviews")
param = pytest.importorskip("param")
pn = pytest.importorskip("panel")

from diffinsights_web.datastore import find_dataset_dir
from diffinsights_web.datastore.timeline import TimelineDataStore
from diffinsights_web.datastore.linesstats import LinesStatsDataStore, sorted_changed_files, \
limit_count_to_selected_files, path_to_dirs_only_counter, reduce_sankey_from_tail, reduce_sankey_thin_out

hv = pytest.importorskip("holoviews")
param = pytest.importorskip("param")
panel = pytest.importorskip("panel")


def test_timeseries_file_no_such_file():
data_store = LinesStatsDataStore(
Expand Down

0 comments on commit 0341d79

Please sign in to comment.