Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(32459)

Unified Diff: Lib/test/test_mmap.py

Issue 26335: Make mmap.write return the number of bytes written like other write methods
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Doc/library/mmap.rst ('k') | Modules/mmapmodule.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
index 0f25742..97aab01 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -713,6 +713,10 @@ class MmapTests(unittest.TestCase):
gc_collect()
self.assertIs(wr(), None)
+ def test_write_returning_the_number_of_bytes_written(self):
+ mm = mmap.mmap(-1, 16)
+ self.assertEqual(mm.write(b"x"), 1)
+
class LargeMmapTests(unittest.TestCase):
def setUp(self):
« no previous file with comments | « Doc/library/mmap.rst ('k') | Modules/mmapmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+