File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1414
1515import json
1616import os
17+ import pathlib
1718
1819import boto3
1920import pytest
8687PYTORCH_RENEWED_GPU = "ml.g4dn.xlarge"
8788
8889
90+ image_uris_unit_tests_dir = pathlib .Path ("tests/unit/sagemaker/image_uris" )
91+
92+
93+ def pytest_collection_modifyitems (config , items ):
94+ for item in items :
95+ testmod = pathlib .Path (item .fspath )
96+ if config .rootdir / image_uris_unit_tests_dir in testmod .parents :
97+ item .add_marker (pytest .mark .image_uris_unit_test )
98+
99+
89100def pytest_addoption (parser ):
90101 parser .addoption ("--sagemaker-client-config" , action = "store" , default = None )
91102 parser .addoption ("--sagemaker-runtime-config" , action = "store" , default = None )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ markers =
5959 local_mode
6060 slow_test
6161 release
62+ image_uris_unit_test
6263 timeout: mark a test as a timeout.
6364
6465[testenv]
You can’t perform that action at this time.
0 commit comments