Skip to content

Commit 28d97e5

Browse files
committed
actual test with pyfive variable
1 parent 35a29d5 commit 28d97e5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/unit/test_active.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import numpy as np
3+
import pyfive
34
import pytest
45
import threading
56

@@ -82,11 +83,20 @@ def test_active():
8283
init = active.__init__(dataset=uri, ncvar=ncvar)
8384

8485

85-
def test_activevariable():
86+
def test_activevariable_netCDF4():
8687
uri = "tests/test_data/cesm2_native.nc"
8788
ncvar = "TREFHT"
8889
ds = Dataset(uri)
89-
av = Active(ds, ncvar)
90+
av = Active(ds[ncvar])
91+
av._method = "min"
92+
assert av.method([3,444]) == 3
93+
94+
95+
def test_activevariable_pyfive():
96+
uri = "tests/test_data/cesm2_native.nc"
97+
ncvar = "TREFHT"
98+
ds = pyfive.File(uri)
99+
av = Active(ds[ncvar])
90100
av._method = "min"
91101
assert av.method([3,444]) == 3
92102

0 commit comments

Comments
 (0)