summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/audit-tests.py7
-rw-r--r--Lib/test/test_audit.py3
2 files changed, 10 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)
diff --git a/Lib/test/test_audit.py b/Lib/test/test_audit.py
index f629b7b..2fc41bd 100644
--- a/Lib/test/test_audit.py
+++ b/Lib/test/test_audit.py
@@ -74,6 +74,9 @@ class AuditTest(unittest.TestCase):
def test_cantrace(self):
self.do_test("test_cantrace")
+ def test_mmap(self):
+ self.do_test("test_mmap")
+
if __name__ == "__main__":
unittest.main()