Disable pytest-timeout for now. (#8348)

This commit is contained in:
Jiaming Yuan
2022-10-17 23:06:10 +08:00
committed by GitHub
parent fcddbc9264
commit 2176e511fc
13 changed files with 107 additions and 58 deletions

View File

@@ -1,12 +1,15 @@
import xgboost as xgb
from xgboost.data import SingleBatchInternalIter as SingleBatch
import numpy as np
from testing import IteratorForTest, non_increasing, make_batches
import pytest
from hypothesis import given, strategies, settings
from hypothesis import given, settings, strategies
from scipy.sparse import csr_matrix
from testing import IteratorForTest, make_batches, non_increasing
from xgboost.data import SingleBatchInternalIter as SingleBatch
import xgboost as xgb
from xgboost import testing
pytestmark = testing.timeout(30)
pytestmark = pytest.mark.timeout(30)
def test_single_batch(tree_method: str = "approx") -> None:
from sklearn.datasets import load_breast_cancer

View File

@@ -1,10 +1,13 @@
import os
import subprocess
import pytest
import testing as tm
import sys
pytestmark = pytest.mark.timeout(30)
import pytest
import testing as tm
from xgboost import testing
pytestmark = testing.timeout(30)
ROOT_DIR = tm.PROJECT_ROOT
DEMO_DIR = os.path.join(ROOT_DIR, 'demo')

View File

@@ -1,9 +1,11 @@
import testing as tm
import pytest
from hypothesis import strategies, given, settings, note
import xgboost as xgb
from hypothesis import given, note, settings, strategies
import xgboost as xgb
from xgboost import testing
pytestmark = testing.timeout(10)
pytestmark = pytest.mark.timeout(10)
parameter_strategy = strategies.fixed_dictionaries({
'booster': strategies.just('gblinear'),

View File

@@ -1,14 +1,16 @@
import os
import tempfile
import subprocess
import tempfile
import xgboost as xgb
import numpy as np
import pytest
import testing as tm
pytestmark = pytest.mark.timeout(10)
import xgboost as xgb
from xgboost import testing
pytestmark = testing.timeout(10)
class TestOMP:
def test_omp(self):

View File

@@ -9,6 +9,7 @@ import pytest
import testing as tm
import xgboost as xgb
from xgboost import testing
if tm.no_spark()["condition"]:
pytest.skip(msg=tm.no_spark()["reason"], allow_module_level=True)
@@ -37,7 +38,7 @@ from .utils import SparkTestCase
logging.getLogger("py4j").setLevel(logging.INFO)
pytestmark = pytest.mark.timeout(60)
pytestmark = testing.timeout(60)
class XgboostLocalTest(SparkTestCase):

View File

@@ -29,6 +29,7 @@ from test_with_sklearn import run_data_initialization, run_feature_weights
from xgboost.data import _is_cudf_df
import xgboost as xgb
from xgboost import testing
if sys.platform.startswith("win"):
pytest.skip("Skipping dask tests on Windows", allow_module_level=True)
@@ -44,7 +45,7 @@ from xgboost.dask import DaskDMatrix
dask.config.set({"distributed.scheduler.allowed-failures": False})
pytestmark = pytest.mark.timeout(30)
pytestmark = testing.timeout(30)
if hasattr(HealthCheck, 'function_scoped_fixture'):
suppress = [HealthCheck.function_scoped_fixture]

View File

@@ -1,20 +1,20 @@
from typing import Callable, Optional
import collections
import importlib.util
import numpy as np
import xgboost as xgb
import testing as tm
import tempfile
import os
import shutil
import pytest
import json
import os
import tempfile
from typing import Callable, Optional
import numpy as np
import pytest
import testing as tm
from sklearn.utils.estimator_checks import parametrize_with_checks
import xgboost as xgb
from xgboost import testing
rng = np.random.RandomState(1994)
pytestmark = [pytest.mark.skipif(**tm.no_sklearn()), pytest.mark.timeout(30)]
from sklearn.utils.estimator_checks import parametrize_with_checks
pytestmark = [pytest.mark.skipif(**tm.no_sklearn()), testing.timeout(30)]
def test_binary_classification():