From 05dc3957bda3d98e039306c67fb07e172039cd6b Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 15 Feb 2022 09:24:42 -0800 Subject: [PATCH] Only delete keys if they exist, which depending on the invocation they may not. --- python/cudf/cudf/tests/conftest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/cudf/cudf/tests/conftest.py b/python/cudf/cudf/tests/conftest.py index 1aa8665f952..fa9061629df 100644 --- a/python/cudf/cudf/tests/conftest.py +++ b/python/cudf/cudf/tests/conftest.py @@ -32,5 +32,8 @@ def pytest_sessionfinish(session, exitstatus): Called after whole test run finished, right before returning the exit status to the system. """ - del os.environ["NO_EXTERNAL_ONLY_APIS"] - del os.environ["_CUDF_TEST_ROOT"] + try: + del os.environ["NO_EXTERNAL_ONLY_APIS"] + del os.environ["_CUDF_TEST_ROOT"] + except KeyError: + pass