diff options
Diffstat (limited to 'Lib/test/test_mmap.py')
-rw-r--r-- | Lib/test/test_mmap.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 5bf7eb0..f6ee371 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -419,6 +419,13 @@ class MmapTests(unittest.TestCase): except OSError: pass + def test_subclass(self): + class anon_mmap(mmap.mmap): + def __new__(klass, *args, **kwargs): + return mmap.mmap.__new__(klass, -1, *args, **kwargs) + anon_mmap(PAGESIZE) + + def test_main(): run_unittest(MmapTests) |