Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7aa542c

Browse files
committed
TST: tests working on OS X
1 parent a8239f3 commit 7aa542c

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

nmrglue/util/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# default tolerences
88
RTOL = 1.001e-01
99
ATOL = 1.001e-01
10-
DTOL = 1.001e-01
10+
DTOL = 5.001e-01
1111

1212

1313
def pair_similar(dic1, data1, dic2, data2, verb=False, atol=ATOL, rtol=RTOL,

tests/test_convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def test_agilent_2d_rnmrtk():
344344
vC.from_varian(vdic, vdata, uvdic)
345345

346346
# prepare rnmrtk converter
347-
rdic, rdata = ng.rnmrtk.read(os.path.join(DATA_DIR + "rnmrtk_2d",
347+
rdic, rdata = ng.rnmrtk.read(os.path.join(DATA_DIR, "rnmrtk_2d",
348348
"time_2d.sec"))
349349
urdic = ng.rnmrtk.guess_udic(rdic, rdata)
350350
rC = ng.convert.converter()

tests/test_pipe.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def test_1d_freq():
9595
os.path.join(DATA_DIR, "nmrpipe_1d", "test.ft"))
9696
assert data.shape == (4096, )
9797
assert data.dtype == 'float32'
98-
assert round(data[0], 2) == -63789.66
99-
assert round(data[1], 2) == -63159.88
100-
assert round(data[100], 2) == -29308.34
98+
assert round(data[0], 1) == -63789.6
99+
assert round(data[1], 1) == -63159.9
100+
assert round(data[100], 1) == -29308.4
101101
write_readback(dic, data)
102102
check_ppm_limits(dic, data, 0, [297.92, -99.82])
103103

@@ -107,9 +107,9 @@ def test_1d_cut():
107107
os.path.join(DATA_DIR, "nmrpipe_1d", "test_cut.ft"))
108108
assert data.shape == (2766, )
109109
assert data.dtype == 'float32'
110-
assert round(data[0], 2) == -12123.67
111-
assert round(data[1], 2) == -8979.31
112-
assert round(data[100], 2) == -7625.30
110+
assert round(data[0], 1) == -12123.7
111+
assert round(data[1], 0) == -8979
112+
assert round(data[100], 1) == -7625.3
113113
write_readback(dic, data)
114114
check_ppm_limits(dic, data, 0, [278.59, 10.03])
115115

@@ -228,8 +228,8 @@ def test_3d_freq():
228228
# and the first slice
229229
assert sdata.shape == (128, 4096)
230230
assert sdata.dtype == 'float32'
231-
assert round(sdata[1, 2], 2) == 25980.13
232-
assert round(sdata[22, 5], 2) == -8336.05
231+
assert round(sdata[1, 2], 0) == 25980
232+
assert round(sdata[22, 5], 0) == -8336
233233
check_ppm_limits(sdic, sdata, 0, [147.42, 93.01])
234234
check_ppm_limits(sdic, sdata, 1, [254.92, -142.83])
235235

0 commit comments

Comments
 (0)