Skip to content

Commit 6e158e8

Browse files
committed
One more set of fix
1 parent 0ff4d95 commit 6e158e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clang/bindings/python/tests/cindex/test_environment_variable.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,19 @@ def test_working_libclang_library_path(self):
4343
):
4444
self.skipTest(f"Skipping because {filename} is not a default libclang name")
4545

46+
# Remove LIBCLANG_LIBRARY_FILE to avoid it taking precedence if set by the user
47+
os.environ.pop("LIBCLANG_LIBRARY_FILE", None)
48+
4649
with unittest.mock.patch.dict(
4750
os.environ, {"LIBCLANG_LIBRARY_PATH": ref_libclang_library_path}
4851
):
4952
reset_import_and_get_frech_config().lib
5053

5154
@unittest.mock.patch.dict("os.environ", {"LIBCLANG_LIBRARY_PATH": "not_a_real_dir"})
52-
def _test_non_working_libclang_library_path(self):
55+
def test_non_working_libclang_library_path(self):
56+
# Remove LIBCLANG_LIBRARY_FILE to avoid it taking precedence if set by the user
57+
os.environ.pop("LIBCLANG_LIBRARY_FILE", None)
58+
5359
config = reset_import_and_get_frech_config()
5460
import clang.cindex
5561

0 commit comments

Comments
 (0)