Unverified Commit fa2af422 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] stop skipping Arrow test at Appveyor (#7050)

* Update .appveyor.yml

* Update .appveyor.yml

* Update test_arrow.py

* Update test_arrow.py

* Update .appveyor.yml

* Update test_arrow.py
parent 7c10e6d8
...@@ -24,7 +24,6 @@ install: ...@@ -24,7 +24,6 @@ install:
- set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH% - set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
- set PYTHON_VERSION=%CONFIGURATION% - set PYTHON_VERSION=%CONFIGURATION%
- ps: | - ps: |
$env:ALLOW_SKIP_ARROW_TESTS = "1"
$env:APPVEYOR = "true" $env:APPVEYOR = "true"
$env:CMAKE_BUILD_PARALLEL_LEVEL = 4 $env:CMAKE_BUILD_PARALLEL_LEVEL = 4
$env:MINICONDA = "C:\Miniconda3-x64" $env:MINICONDA = "C:\Miniconda3-x64"
......
# coding: utf-8 # coding: utf-8
import filecmp import filecmp
import os
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Optional from typing import Any, Dict, Optional
...@@ -11,18 +10,10 @@ import lightgbm as lgb ...@@ -11,18 +10,10 @@ import lightgbm as lgb
from .utils import np_assert_array_equal from .utils import np_assert_array_equal
# NOTE: In the AppVeyor CI, importing pyarrow fails due to an old Visual Studio version. Hence, if not lgb.compat.PYARROW_INSTALLED:
# we conditionally import pyarrow here (and skip tests if it cannot be imported). However, we pytest.skip("pyarrow is not installed", allow_module_level=True)
# don't want these tests to silently be skipped, hence, we only conditionally import when a
# specific env var is set. import pyarrow as pa
if os.getenv("ALLOW_SKIP_ARROW_TESTS") == "1":
pa = pytest.importorskip("pyarrow")
else:
import pyarrow as pa # type: ignore
assert lgb.compat.PYARROW_INSTALLED is True, (
"'pyarrow' and its dependencies must be installed to run the arrow tests"
)
# ----------------------------------------------------------------------------------------------- # # ----------------------------------------------------------------------------------------------- #
# UTILITIES # # UTILITIES #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment