Skip to content

Commit 4726104

Browse files
committed
Removed active sections
1 parent 8e4ad12 commit 4726104

File tree

3 files changed

+215
-183
lines changed

3 files changed

+215
-183
lines changed

cfapyx/tests/test_read.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
# All routines for testing CFA general methods.
2-
import os
3-
4-
import pytest
52
import xarray as xr
63

74
TESTDIR = 'cfapyx/tests/test_space'
85

96
class TestCFARead:
107

11-
def test_cfa_pure(self, testdir=TESTDIR, active=False):
8+
def test_cfa_pure(self, testdir=TESTDIR):
129

1310
FILE = f'{testdir}/testrain.nca'
1411

1512
# Local testing: Add CFAPyX before tests
1613
try:
17-
ds = xr.open_dataset(FILE, engine='CFA',
18-
cfa_options={
19-
'use_active':active
20-
})
14+
ds = xr.open_dataset(FILE, engine='CFA')
2115
except Exception as err:
2216
assert isinstance(err, ImportError)
23-
print(f'Integration tests: Read(pure, active={active}) - skipped')
17+
print('Integration tests: Read(pure) - skipped')
2418
return
2519

2620
## Test global dataset
@@ -48,7 +42,7 @@ def test_cfa_pure(self, testdir=TESTDIR, active=False):
4842
assert p_value.shape == ()
4943
assert (p_value.to_numpy() - 0.511954) < 0.01
5044

51-
print(f'Integration tests: Read(pure, active={active}) - complete')
45+
print('Integration tests: Read(pure) - complete')
5246

5347
def test_cfa_chunks(self, testdir=TESTDIR):
5448

@@ -84,8 +78,14 @@ def test_cfa_chunks(self, testdir=TESTDIR):
8478
assert p_value.shape == ()
8579
assert (p_value.to_numpy() - 0.490389) < 0.01
8680

87-
print(f'Integration tests: Read(chunked) - complete')
81+
print('Integration tests: Read(chunked) - complete')
8882

8983
if __name__ == '__main__':
9084

85+
#import os
86+
#os.chdir('CFAPyX')
87+
88+
TestCFARead().test_cfa_pure()
89+
TestCFARead().test_cfa_chunks()
90+
9191
print('Run with poetry run pytest -v -s')

0 commit comments

Comments
 (0)