From 39554697c103adef52181e1bde929d3477635c77 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Thu, 10 Oct 2024 22:42:23 +0000 Subject: [PATCH] Needed for tests that import modules under tests/morpheus without install Example: Without this change - [pytest -v tests/morpheus] - works [pytest -v tests/morpheus/pipeline] - fails Signed-off-by: Anuradha Karuppiah --- tests/morpheus/conftest.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/morpheus/conftest.py diff --git a/tests/morpheus/conftest.py b/tests/morpheus/conftest.py new file mode 100644 index 0000000000..7b07736805 --- /dev/null +++ b/tests/morpheus/conftest.py @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is 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. + +import sys + +import pytest + +from _utils import TEST_DIRS + + +@pytest.fixture(autouse=True) +def morpheus_sys_path(): + sys.path.append(TEST_DIRS.tests_dir + "/morpheus") +