File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 44import pytest
55from abi3info .models import Function , PyVersion , Symbol
66
7+ from abi3audit ._audit import _ALLOWED_SYMBOLS as ALLOWED_SYMBOLS
78from abi3audit ._audit import audit
89
910
@@ -81,12 +82,24 @@ def __iter__(self) -> Iterator[Symbol]:
8182 Symbol ("Py_foo_bar" , None ),
8283 ],
8384 ),
85+ SharedObject (
86+ baseline = PyVersion (3 , 10 ),
87+ computed = PyVersion (3 , 10 ),
88+ symbols = [
89+ Symbol ("PyType_GetModule" , "global" ),
90+ Symbol ("Py_abi3audit_allowed_symbol" , "global" ),
91+ ],
92+ ),
8493]
8594
8695
8796@pytest .mark .parametrize ("so" , shared_objects )
8897def test_audit_result_unit_test (so ):
89- result = audit (so , so .baseline )
98+ ALLOWED_SYMBOLS .add ("Py_abi3audit_allowed_symbol" )
99+ try :
100+ result = audit (so , so .baseline )
101+ finally :
102+ ALLOWED_SYMBOLS .remove ("Py_abi3audit_allowed_symbol" )
90103 assert result .baseline == so .baseline
91104 assert result .computed == so .computed
92105 assert result .future_abi3_objects == set (so .future_abi3_objects )
You can’t perform that action at this time.
0 commit comments