Skip to content

Commit d4c8e28

Browse files
committed
test_analyze_wheel_abi: reload and reimport analyze_wheel_abi
It seems that in addition to reloading lddtree, reload of auditwheel.wheel_abi and reimport of analyze_wheel_abi is needed to full flush and reset analyze_wheel_abi() lru_caches.
1 parent 9f06c60 commit d4c8e28

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/integration/test_bundled_wheels.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import pytest
1313

14+
import auditwheel.wheel_abi
1415
from auditwheel import lddtree, main_repair
1516
from auditwheel.architecture import Architecture
1617
from auditwheel.libc import Libc
@@ -87,7 +88,9 @@ def test_analyze_wheel_abi(file, external_libs, exclude, env):
8788
with pytest.MonkeyPatch.context() as cp:
8889
if env:
8990
cp.setenv(env, f"{HERE}")
90-
importlib.reload(lddtree)
91+
importlib.reload(lddtree)
92+
importlib.reload(auditwheel.wheel_abi)
93+
from auditwheel.wheel_abi import analyze_wheel_abi
9194

9295
winfo = analyze_wheel_abi(
9396
Libc.GLIBC, Architecture.x86_64, HERE / file, exclude, False, True
@@ -96,8 +99,8 @@ def test_analyze_wheel_abi(file, external_libs, exclude, env):
9699
f"{HERE}, {exclude}, {env}"
97100
)
98101

99-
if env:
100-
importlib.reload(lddtree)
102+
importlib.reload(lddtree)
103+
importlib.reload(auditwheel.wheel_abi)
101104

102105

103106
def test_analyze_wheel_abi_pyfpe():

0 commit comments

Comments
 (0)