Skip to content

Commit e2063e3

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

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/integration/test_bundled_wheels.py

Lines changed: 5 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,8 @@ 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)
9193

9294
winfo = analyze_wheel_abi(
9395
Libc.GLIBC, Architecture.x86_64, HERE / file, exclude, False, True
@@ -96,8 +98,8 @@ def test_analyze_wheel_abi(file, external_libs, exclude, env):
9698
f"{HERE}, {exclude}, {env}"
9799
)
98100

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

102104

103105
def test_analyze_wheel_abi_pyfpe():

0 commit comments

Comments
 (0)