@@ -13,12 +13,19 @@ def dtype():
13
13
14
14
15
15
@pytest .fixture
16
- def data ():
16
+ def allow_in_pandas (monkeypatch ):
17
+ with monkeypatch .context () as m :
18
+ m .setattr (NumPyExtensionArray , '_typ' , 'extension' )
19
+ yield
20
+
21
+
22
+ @pytest .fixture
23
+ def data (allow_in_pandas ):
17
24
return NumPyExtensionArray (np .arange (100 ))
18
25
19
26
20
27
@pytest .fixture
21
- def data_missing ():
28
+ def data_missing (allow_in_pandas ):
22
29
return NumPyExtensionArray (np .array ([np .nan , 1.0 ]))
23
30
24
31
@@ -35,7 +42,7 @@ def cmp(a, b):
35
42
36
43
37
44
@pytest .fixture
38
- def data_for_sorting ():
45
+ def data_for_sorting (allow_in_pandas ):
39
46
"""Length-3 array with a known sort order.
40
47
41
48
This should be three items [B, C, A] with
@@ -47,7 +54,7 @@ def data_for_sorting():
47
54
48
55
49
56
@pytest .fixture
50
- def data_missing_for_sorting ():
57
+ def data_missing_for_sorting (allow_in_pandas ):
51
58
"""Length-3 array with a known sort order.
52
59
53
60
This should be three items [B, NA, A] with
@@ -59,7 +66,7 @@ def data_missing_for_sorting():
59
66
60
67
61
68
@pytest .fixture
62
- def data_for_grouping ():
69
+ def data_for_grouping (allow_in_pandas ):
63
70
"""Data for factorization, grouping, and unique tests.
64
71
65
72
Expected to be like [B, B, NA, NA, A, A, B, C]
0 commit comments