This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 47e438adf7 GH-15017: [Python] Harden test_memory.py for use with
ARROW_USE_GLOG=ON (#36901)
47e438adf7 is described below
commit 47e438adf74d0c38068d9fd31fca083c650209c8
Author: h-vetinari <[email protected]>
AuthorDate: Fri Jul 28 13:31:01 2023 +1100
GH-15017: [Python] Harden test_memory.py for use with ARROW_USE_GLOG=ON
(#36901)
Accept output pattern for ARROW_USE_GLOG=ON too.
* Closes: #15017
Lead-authored-by: H. Vetinari <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
dev/tasks/conda-recipes/arrow-cpp/meta.yaml | 2 --
python/pyarrow/tests/test_memory.py | 10 ++++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml
b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml
index e61034c307..ac4b29eb5e 100644
--- a/dev/tasks/conda-recipes/arrow-cpp/meta.yaml
+++ b/dev/tasks/conda-recipes/arrow-cpp/meta.yaml
@@ -403,8 +403,6 @@ outputs:
{% set tests_to_skip = tests_to_skip + " or
test_safe_cast_from_float_with_nans_to_int" %} # [ppc64le]
# gandiva tests are segfaulting on ppc
{% set tests_to_skip = tests_to_skip + " or
test_float_with_null_as_integer" %} # [ppc64le]
- # "Unsupported backend 'nonexistent' specified in
ARROW_DEFAULT_MEMORY_POOL"
- {% set tests_to_skip = tests_to_skip + " or (test_memory and
test_env_var)" %} # [unix]
# test is broken; header is in $PREFIX, not $SP_DIR
{% set tests_to_skip = tests_to_skip + " or (test_misc and
test_get_include)" %} # [unix]
# flaky tests that fail occasionally
diff --git a/python/pyarrow/tests/test_memory.py
b/python/pyarrow/tests/test_memory.py
index 092c50de33..d9fdeb152c 100644
--- a/python/pyarrow/tests/test_memory.py
+++ b/python/pyarrow/tests/test_memory.py
@@ -134,8 +134,14 @@ def check_env_var(name, expected, *, expect_warning=False):
res.check_returncode() # fail
errlines = res.stderr.splitlines()
if expect_warning:
- assert len(errlines) == 1
- assert f"Unsupported backend '{name}'" in errlines[0]
+ assert len(errlines) in (1, 2)
+ if len(errlines) == 1:
+ # ARROW_USE_GLOG=OFF
+ assert f"Unsupported backend '{name}'" in errlines[0]
+ else:
+ # ARROW_USE_GLOG=ON
+ assert "InitGoogleLogging()" in errlines[0]
+ assert f"Unsupported backend '{name}'" in errlines[1]
else:
assert len(errlines) == 0