Skip to content

Commit 12110c9

Browse files
authored
[CI] Make Python model compatibility test runnable locally (#5941)
1 parent 487ab0c commit 12110c9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/python/test_model_compatibility.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def run_scikit_model_check(name, path):
8787
assert False
8888

8989

90-
@pytest.mark.ci
9190
def test_model_compatibility():
9291
'''Test model compatibility, can only be run on CI as others don't
9392
have the credentials.
@@ -102,13 +101,9 @@ def test_model_compatibility():
102101
pytest.skip(
103102
'Skiping compatibility tests as boto3 is not installed.')
104103

105-
try:
106-
s3_bucket = boto3.resource('s3').Bucket('xgboost-ci-jenkins-artifacts')
107-
zip_path = 'xgboost_model_compatibility_test.zip'
108-
s3_bucket.download_file(zip_path, zip_path)
109-
except botocore.exceptions.NoCredentialsError:
110-
pytest.skip(
111-
'Skiping compatibility tests as running on non-CI environment.')
104+
s3_bucket = boto3.resource('s3').Bucket('xgboost-ci-jenkins-artifacts')
105+
zip_path = 'xgboost_model_compatibility_test.zip'
106+
s3_bucket.download_file(zip_path, zip_path)
112107

113108
with zipfile.ZipFile(zip_path, 'r') as z:
114109
z.extractall(path)

0 commit comments

Comments
 (0)