Skip to content

change: add image_uris_unit_test pytest mark #4211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import json
import os
import pathlib

import boto3
import pytest
Expand Down Expand Up @@ -86,6 +87,16 @@
PYTORCH_RENEWED_GPU = "ml.g4dn.xlarge"


image_uris_unit_tests_dir = pathlib.Path("tests/unit/sagemaker/image_uris")


def pytest_collection_modifyitems(config, items):
for item in items:
testmod = pathlib.Path(item.fspath)
if config.rootdir / image_uris_unit_tests_dir in testmod.parents:
item.add_marker(pytest.mark.image_uris_unit_test)


def pytest_addoption(parser):
parser.addoption("--sagemaker-client-config", action="store", default=None)
parser.addoption("--sagemaker-runtime-config", action="store", default=None)
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ markers =
local_mode
slow_test
release
image_uris_unit_test
timeout: mark a test as a timeout.

[testenv]
Expand Down