]> granicus.if.org Git - python/commitdiff
Add test of resize() method of mmap objects
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 11 Jul 2000 10:45:28 +0000 (10:45 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 11 Jul 2000 10:45:28 +0000 (10:45 +0000)
Lib/test/output/test_mmap
Lib/test/test_mmap.py

index 0e880e38cdf27398f248e705ef8d7f298bb07d11..2ceed20e3104f673a4e85e068844e001e1c16c1c 100644 (file)
Binary files a/Lib/test/output/test_mmap and b/Lib/test/output/test_mmap differ
index c3cafca8341a495ebb9bdfd5f056271705f423d2..171eb1497c049d70ef3275bbc1fcade036bbf807 100644 (file)
@@ -94,6 +94,19 @@ def test_both():
     else:
         assert 0, 'expected a ValueError but did not get it'
 
+    # Try resizing map
+    print '  Attempting resize()'
+    try:
+       m.resize( 512 )
+    except SystemError:
+        # resize() not supported
+        # No messages are printed, since the output of this test suite
+        # would then be different across platforms.
+        pass
+    else:
+       # resize() is supported
+        pass
+    
     m.close()
     os.unlink("foo")
     print ' Test passed'