Move Python testing utilities into xgboost module. (#8379)

- Add typehints.
- Fixes for pylint.

Co-authored-by: Hyunsu Philip Cho <chohyu01@cs.washington.edu>
This commit is contained in:
Jiaming Yuan
2022-10-26 16:56:11 +08:00
committed by GitHub
parent 7e53189e7c
commit cf70864fa3
66 changed files with 652 additions and 595 deletions

View File

@@ -1,10 +1,13 @@
import os
import subprocess
import sys
import pytest
from xgboost import testing as tm
sys.path.append("tests/python")
import testing as tm
import test_demos as td # noqa
import test_demos as td # noqa
@pytest.mark.skipif(**tm.no_cupy())
@@ -31,6 +34,6 @@ def test_categorical_demo():
@pytest.mark.skipif(**tm.no_cupy())
@pytest.mark.mgpu
def test_dask_training():
script = os.path.join(tm.PROJECT_ROOT, 'demo', 'dask', 'gpu_training.py')
script = os.path.join(tm.demo_dir(__file__), 'dask', 'gpu_training.py')
cmd = ['python', script]
subprocess.check_call(cmd)
subprocess.check_call(cmd)