Skip to content

Commit f9d2011

Browse files
committed
skip some colors tests
1 parent acde819 commit f9d2011

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

WrightTools/data/_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,8 @@ def norm_for_each(
790790
norm_vals = np.expand_dims(np.nanmax(channel[:], axis=trivial), trivial)
791791
new = (channel[:] - channel.null) / (norm_vals - channel.null)
792792
if new_channel:
793+
if not isinstance(new_channel, dict):
794+
new_channel={}
793795
self.create_channel(
794796
new_channel.pop("name", f"{channel.natural_name}_{variable.natural_name}_norm"),
795797
values=new,

tests/data/from_COLORS.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# --- import --------------------------------------------------------------------------------------
66

7-
7+
import pytest
88
import numpy as np
99
import glob
1010
import os
@@ -47,6 +47,7 @@ def test_v0p2_d1_d2_diagonal():
4747
data.close()
4848

4949

50+
@pytest.mark.skip(reason="This test takes a long time and examines rarely used code.")
5051
def test_v2p1_MoS2_TrEE_movie():
5152
ps = sorted(
5253
glob.glob(
@@ -61,6 +62,7 @@ def test_v2p1_MoS2_TrEE_movie():
6162
data.close()
6263

6364

65+
@pytest.mark.skip(reason="This test takes a long time and examines rarely used code.")
6466
def test_v2p2_WL_wigner():
6567
p = datasets.COLORS.v2p2_WL_wigner
6668
data = wt.data.from_COLORS(p)

tests/dataset/max.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# --- import --------------------------------------------------------------------------------------
44

5-
5+
import pytest
66
import h5py
77
import numpy as np
88

@@ -13,6 +13,7 @@
1313
# --- test ----------------------------------------------------------------------------------------
1414

1515

16+
@pytest.mark.skip(reason="This test takes a long time and code is rarely used.")
1617
def test_COLORS_v2p2_WL_wigner():
1718
p = datasets.COLORS.v2p2_WL_wigner
1819
data = wt.data.from_COLORS(p)

tests/dataset/min.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# --- import --------------------------------------------------------------------------------------
44

5+
import pytest
56
import pathlib
67

78
import h5py
@@ -14,6 +15,7 @@
1415
# --- test ----------------------------------------------------------------------------------------
1516

1617

18+
@pytest.mark.skip(reason="This test takes a long time and code is rarely used.")
1719
def test_COLORS_v2p2_WL_wigner():
1820
p = datasets.COLORS.v2p2_WL_wigner
1921
data = wt.data.from_COLORS(p)

0 commit comments

Comments
 (0)