summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_mmap.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index b3869a6..b6d2ffb 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -536,6 +536,15 @@ class MmapTests(unittest.TestCase):
m.seek(8)
self.assertRaises(ValueError, m.write, b"bar")
+ def test_non_ascii_byte(self):
+ for b in (129, 200, 255): # > 128
+ m = mmap.mmap(-1, 1)
+ m.write_byte(b)
+ self.assertEquals(m[0], b)
+ m.seek(0)
+ self.assertEquals(m.read_byte(), b)
+ m.close()
+
if os.name == 'nt':
def test_tagname(self):
data1 = b"0123456789"