Skip to content

Commit a76755e

Browse files
authored
Fix pytest fixture deprecation warning (#698)
Gets rid of this error: ``` tests/conftest.py:109 /Users/wkillian/Desktop/NeMo-Agent-Toolkit/tests/conftest.py:109: PytestRemovedIn9Warning: Marks applied to fixtures have no effect See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function @pytest.mark.usefixtures("restore_environ") ``` Closes ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Will Killian (https://github.com/willkill07) Approvers: - Eric Evans II (https://github.com/ericevans-nv) URL: #698
1 parent 24a5355 commit a76755e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@ def restore_environ_fixture():
106106
del (os.environ[key])
107107

108108

109-
@pytest.mark.usefixtures("restore_environ")
110109
@pytest.fixture(name="set_test_api_keys")
111-
def set_test_api_keys_fixture():
110+
def set_test_api_keys_fixture(restore_environ): # pylint: disable=unused-argument
112111
for key in ("NGC_API_KEY", "NVD_API_KEY", "NVIDIA_API_KEY", "OPENAI_API_KEY", "SERPAPI_API_KEY"):
113112
os.environ[key] = "test_key"
114113

0 commit comments

Comments
 (0)