17 lines
698 B
Python
17 lines
698 B
Python
import importlib.util
|
|
from pathlib import Path
|
|
|
|
|
|
def test_bundle_excludes_foreign_icu_but_keeps_qt_and_crt():
|
|
file=Path(__file__).parents[1]/"packaging/bundle_policy.py"
|
|
spec=importlib.util.spec_from_file_location("bundle_policy",file)
|
|
module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)
|
|
entries=[
|
|
("icuuc.dll",r"C:\tools\poppler\icuuc.dll","BINARY"),
|
|
("icudt78.dll",r"C:\tools\poppler\icudt78.dll","BINARY"),
|
|
(r"PySide6\Qt6Core.dll",r"C:\python\PySide6\Qt6Core.dll","BINARY"),
|
|
("VCRUNTIME140.dll",r"C:\python\VCRUNTIME140.dll","BINARY"),
|
|
]
|
|
filtered=module.filter_binaries(entries)
|
|
assert filtered == entries[2:]
|