summaryrefslogtreecommitdiffstats
path: root/Lib/test/audit-tests.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-06-21 15:31:59 (GMT)
committerSteve Dower <steve.dower@python.org>2019-06-21 15:31:59 (GMT)
commit08286d52b29de604a4b187bf1f0d4209e39c926c (patch)
tree36af2d00c327f0482135deac89d724481ce2ee76 /Lib/test/audit-tests.py
parent08970cb03c61f62f4f69e7769d0075fa66bb86aa (diff)
downloadcpython-08286d52b29de604a4b187bf1f0d4209e39c926c.zip
cpython-08286d52b29de604a4b187bf1f0d4209e39c926c.tar.gz
cpython-08286d52b29de604a4b187bf1f0d4209e39c926c.tar.bz2
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
Also, add a missing call to va_end() in PySys_Audit().
Diffstat (limited to 'Lib/test/audit-tests.py')
-rw-r--r--Lib/test/audit-tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index 7a7725f..ddeff22 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -261,6 +261,13 @@ def test_cantrace():
assertSequenceEqual(["call"] * 4, traced)
+def test_mmap():
+ import mmap
+ with TestHook() as hook:
+ mmap.mmap(-1, 8)
+ assertEqual(hook.seen[0][1][:2], (-1, 8))
+
+
if __name__ == "__main__":
from test.libregrtest.setup import suppress_msvcrt_asserts
suppress_msvcrt_asserts(False)