@@ -24,47 +24,6 @@ def create_test_dataset(tmp_path):
24
24
return test_file
25
25
26
26
27
- @pytest .mark .xfail (USE_S3 , reason = "descriptor 'flatten' for 'numpy.ndarray' objects doesn't apply to a 'memoryview' object" )
28
- def test_read0 (tmp_path ):
29
- """
30
- Test a normal read slicing the data an interesting way, using version 0 (native interface)
31
- """
32
- test_file = create_test_dataset (tmp_path )
33
- active = Active (test_file , 'data' , utils .get_storage_type ())
34
- active ._version = 0
35
- d = active [0 :2 ,4 :6 ,7 :9 ]
36
- nda = np .ndarray .flatten (d .data )
37
- assert np .array_equal (nda ,np .array ([740. ,840. ,750. ,850. ,741. ,841. ,751. ,851. ]))
38
-
39
- def test_read1 (tmp_path ):
40
- """
41
- Test a normal read slicing the data an interesting way, using version 1 (replicating native interface in our code)
42
- """
43
- test_file = create_test_dataset (tmp_path )
44
- #active = Active(test_file, 'data', utils.get_storage_type())
45
- #active._version = 0
46
- #d0 = active[0:2,4:6,7:9]
47
-
48
- active = Active (test_file , 'data' , utils .get_storage_type ())
49
- active ._version = 1
50
- d1 = active [0 :2 ,4 :6 ,7 :9 ]
51
- #assert np.array_equal(d0,d1)
52
-
53
- def test_active (tmp_path ):
54
- """
55
- Shows what we expect an active example test to achieve and provides "the right answer"
56
- """
57
- test_file = create_test_dataset (tmp_path )
58
- #active = Active(test_file, 'data', utils.get_storage_type())
59
- #active._version = 0
60
- #d = active[0:2,4:6,7:9]
61
- #mean_result = np.mean(d)
62
-
63
- active = Active (test_file , 'data' , utils .get_storage_type ())
64
- active .method = "mean"
65
- result2 = active [0 :2 ,4 :6 ,7 :9 ]
66
- #assert mean_result == result2
67
-
68
27
def testActiveComponents (tmp_path ):
69
28
"""
70
29
Shows what we expect an active example test to achieve and provides "the right answer"
0 commit comments