@@ -72,6 +72,12 @@ def test_apply_np_reducer(op, how):
72
72
@pytest .mark .parametrize ("how" , ["transform" , "apply" ])
73
73
def test_apply_np_transformer (float_frame , op , how ):
74
74
# GH 39116
75
+ # armel numpy currently doesn't have the invalid log/sqrt warning (see 1.4.3-1 build log,
76
+ # possibly the same underlying issue as statsmodels https://bugs.debian.org/956882)
77
+ # using nullcontext() instead of warn=None to not start failing if this ever gets fixed
78
+ import subprocess
79
+ import contextlib
80
+ debian_arch = subprocess .run (["dpkg" ,"--print-architecture" ],capture_output = True ).stdout
75
81
76
82
# float_frame will _usually_ have negative values, which will
77
83
# trigger the warning here, but let's put one in just to be sure
@@ -80,7 +86,7 @@ def test_apply_np_transformer(float_frame, op, how):
80
86
if op in ["log" , "sqrt" ]:
81
87
warn = RuntimeWarning
82
88
83
- with tm .assert_produces_warning (warn , check_stacklevel = False ):
89
+ with ( contextlib . nullcontext () if ( debian_arch == b'armel \n ' ) else tm .assert_produces_warning (warn , check_stacklevel = False ) ):
84
90
# float_frame fixture is defined in conftest.py, so we don't check the
85
91
# stacklevel as otherwise the test would fail.
86
92
result = getattr (float_frame , how )(op )
0 commit comments