File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ def test_1(self):
17
17
# This comment line was manually added and is not present in the original physiobank record
18
18
del (fields ['comments' ][0 ])
19
19
20
- # Test file writing
21
20
assert np .array_equal (siground , targetsig )
22
21
assert np .array_equal (sig , pbsig ) and fields == pbfields
23
22
@@ -38,7 +37,7 @@ def test_2(self):
38
37
39
38
# Test file writing
40
39
record .wrsamp ()
41
- recordwrite = wfdb .rdsamp ('100' )
40
+ recordwrite = wfdb .rdsamp ('100' , physical = False )
42
41
43
42
assert np .array_equal (sig , targetsig )
44
43
assert record .__eq__ (pbrecord )
@@ -95,7 +94,7 @@ def test_5(self):
95
94
96
95
# Test file writing
97
96
record .wrsamp ()
98
- recordwrite = wfdb .rdsamp ('a103l' )
97
+ recordwrite = wfdb .rdsamp ('a103l' , physical = False )
99
98
100
99
assert np .array_equal (sig , targetsig )
101
100
assert record .__eq__ (pbrecord )
Original file line number Diff line number Diff line change @@ -55,22 +55,22 @@ def __eq__(self, other):
55
55
att2 = other .__dict__
56
56
57
57
if set (att1 .keys ()) != set (att2 .keys ()):
58
- return False , 1
58
+ return False
59
59
60
60
for k in att1 .keys ():
61
61
v1 = att1 [k ]
62
62
v2 = att2 [k ]
63
63
64
64
if type (v1 ) != type (v2 ):
65
- return False , 2
65
+ return False
66
66
67
67
if type (v1 ) == np .ndarray :
68
68
if not np .array_equal (v1 , v2 ):
69
- return False , 3
69
+ return False
70
70
else :
71
71
if v1 != v2 :
72
72
print (k )
73
- return False , 4
73
+ return False
74
74
75
75
return True
76
76
Original file line number Diff line number Diff line change @@ -360,21 +360,22 @@ def __eq__(self, other):
360
360
att2 = other .__dict__
361
361
362
362
if set (att1 .keys ()) != set (att2 .keys ()):
363
- return False , 1
363
+ return False
364
364
365
365
for k in att1 .keys ():
366
+
366
367
v1 = att1 [k ]
367
368
v2 = att2 [k ]
368
369
369
370
if type (v1 ) != type (v2 ):
370
- return False , 2
371
+ return False
371
372
372
373
if type (v1 ) == np .ndarray :
373
374
if not np .array_equal (v1 , v2 ):
374
- return False , 3
375
+ return False
375
376
else :
376
377
if v1 != v2 :
377
- return False , 4
378
+ return False
378
379
379
380
return True
380
381
You can’t perform that action at this time.
0 commit comments