Backport module for sys.audit and sys.addaudithook mechanism
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

12 lines
411 B

import sys
import sysaudit
def test_module(): # type: () -> None
if sys.version_info >= (3, 8, 0):
assert sysaudit.audit == sys.audit # type: ignore [attr-defined]
assert sysaudit.addaudithook == sys.addaudithook # type: ignore [attr-defined]
else:
assert sysaudit.audit == sysaudit._csysaudit.audit
assert sysaudit.addaudithook == sysaudit._csysaudit.addaudithook