Skip to content

Commit 4ad69eb

Browse files
committed
hotfix logic
1 parent 13bf05e commit 4ad69eb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/test_inspector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from nwbinspector.tools import make_minimal_nwbfile
2929
from nwbinspector.utils import FilePathType
3030

31-
DISABLE_STREAMING_TESTS, DISABLE_STREAMING_TESTS_REASON = check_streaming_tests_enabled()
31+
STREAMING_TESTS_ENABLED, DISABLED_STREAMING_TESTS_REASON = check_streaming_tests_enabled()
3232

3333

3434
def add_big_dataset_no_compression(nwbfile: NWBFile):
@@ -560,7 +560,7 @@ def test_inspect_nwb_dandi_config(self):
560560
self.assertCountEqual(first=test_results, second=true_results)
561561

562562

563-
@pytest.mark.skipif(DISABLE_STREAMING_TESTS, reason="Needs h5py setup with ROS3.")
563+
@pytest.mark.skipif(not STREAMING_TESTS_ENABLED, reason=DISABLED_STREAMING_TESTS_REASON or "")
564564
def test_dandiset_streaming():
565565
messages = list(inspect_all(path="000126", select=["check_subject_species_exists"], stream=True))
566566
assert messages[0] == InspectorMessage(
@@ -574,7 +574,7 @@ def test_dandiset_streaming():
574574
)
575575

576576

577-
@pytest.mark.skipif(DISABLE_STREAMING_TESTS, reason="Needs h5py setup with ROS3.")
577+
@pytest.mark.skipif(not STREAMING_TESTS_ENABLED, reason=DISABLED_STREAMING_TESTS_REASON or "")
578578
def test_dandiset_streaming_parallel():
579579
messages = list(inspect_all(path="000126", select=["check_subject_species_exists"], stream=True, n_jobs=2))
580580
assert messages[0] == InspectorMessage(
@@ -588,7 +588,7 @@ def test_dandiset_streaming_parallel():
588588
)
589589

590590

591-
@pytest.mark.skipif(DISABLE_STREAMING_TESTS, reason=DISABLE_STREAMING_TESTS_REASON or "")
591+
@pytest.mark.skipif(not STREAMING_TESTS_ENABLED, reason=DISABLED_STREAMING_TESTS_REASON or "")
592592
class TestStreamingCLI(TestCase):
593593
@classmethod
594594
def setUpClass(cls):

tests/unit_tests/test_time_series.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from nwbinspector.testing import check_streaming_tests_enabled
1717
from nwbinspector.utils import get_package_version, robust_s3_read
1818

19-
DISABLE_STREAMING_TESTS, DISABLE_STREAMING_TESTS_REASON = check_streaming_tests_enabled()
19+
STREAMING_TESTS_ENABLED, DISABLED_STREAMING_TESTS_REASON = check_streaming_tests_enabled()
2020

2121

2222
def test_check_regular_timestamps():
@@ -167,8 +167,8 @@ def test_check_unknown_resolution_pass():
167167

168168

169169
@pytest.mark.skipif(
170-
DISABLE_STREAMING_TESTS or get_package_version("hdmf") >= version.parse("3.3.1"),
171-
reason=f"{DISABLE_STREAMING_TESTS_REASON}. Also needs 'hdmf<3.3.1'.",
170+
not STREAMING_TESTS_ENABLED or get_package_version("hdmf") >= version.parse("3.3.1"),
171+
reason=f"{DISABLED_STREAMING_TESTS_REASON or ''}. Also needs 'hdmf<3.3.1'.",
172172
)
173173
def test_check_none_matnwb_resolution_pass():
174174
"""
@@ -186,8 +186,8 @@ def test_check_none_matnwb_resolution_pass():
186186
) as io:
187187
nwbfile = robust_s3_read(command=io.read)
188188
time_series = robust_s3_read(
189-
"20170203_KIB_01_s1.1.h264",
190189
command=nwbfile.processing["video_files"]["video"].time_series.get,
190+
command_args=["20170203_KIB_01_s1.1.h264"],
191191
)
192192
assert check_resolution(time_series) is None
193193

0 commit comments

Comments
 (0)