From e68d6e51a42e953eb6c5f636891c29d9f242f65e Mon Sep 17 00:00:00 2001 From: Ashwin Krishna Date: Thu, 14 Mar 2024 22:38:56 +0000 Subject: [PATCH] fix: integ test and black check --- tests/integ/core/__init__.py | 2 +- tests/integ/core/conftest.py | 9 ++++++++- tests/integ/core/test_tf.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/integ/core/__init__.py b/tests/integ/core/__init__.py index f0097d8ebb..a6987bc6a6 100644 --- a/tests/integ/core/__init__.py +++ b/tests/integ/core/__init__.py @@ -10,4 +10,4 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -from __future__ import absolute_import \ No newline at end of file +from __future__ import absolute_import diff --git a/tests/integ/core/conftest.py b/tests/integ/core/conftest.py index 24b8acd59c..e90797d23a 100644 --- a/tests/integ/core/conftest.py +++ b/tests/integ/core/conftest.py @@ -15,7 +15,14 @@ import pytest import pathlib + +def pytest_configure(config): + config.addinivalue_line( + "markers", "core: subset of integ tests that must run for every pull request" + ) + + def pytest_collection_modifyitems(config, items): for item in items: - if 'tests/integ/core' in str(item.fspath): + if "tests/integ/core" in str(item.fspath): item.add_marker(pytest.mark.core) diff --git a/tests/integ/core/test_tf.py b/tests/integ/core/test_tf.py index b03b0e60ec..b9a584b58e 100644 --- a/tests/integ/core/test_tf.py +++ b/tests/integ/core/test_tf.py @@ -32,7 +32,7 @@ ROLE = "SageMakerRole" -RESOURCE_PATH = os.path.join(os.path.dirname(__file__), "..", "data") +RESOURCE_PATH = os.path.join(os.path.dirname(__file__), "..", "..", "data") MNIST_RESOURCE_PATH = os.path.join(RESOURCE_PATH, "tensorflow_mnist") TFS_RESOURCE_PATH = os.path.join(RESOURCE_PATH, "tfs", "tfs-test-entrypoint-with-handler")