Skip to content

Commit d124b43

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

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
@@ -46,10 +46,16 @@ def test_working_libclang_library_path(self):
4646
with unittest.mock.patch.dict(
4747
os.environ, {"LIBCLANG_LIBRARY_PATH": ref_libclang_library_path}
4848
):
49+
# Remove LIBCLANG_LIBRARY_FILE to avoid it taking precedence if set by the user
50+
# Need to be in the mocked environement
51+
os.environ.pop("LIBCLANG_LIBRARY_FILE", None)
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)