Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3163179f
Commit
3163179f
authored
Oct 29, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert test_mmap to unittest.
parent
b9f4ad3a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
156 additions
and
276 deletions
+156
-276
Lib/test/output/test_mmap
Lib/test/output/test_mmap
+0
-38
Lib/test/test_mmap.py
Lib/test/test_mmap.py
+156
-238
No files found.
Lib/test/output/test_mmap
deleted
100644 → 0
View file @
b9f4ad3a
test_mmap
<type 'mmap.mmap'>
Position of foo: 1.0 pages
Length of file: 2.0 pages
Contents of byte 0: '\x00'
Contents of first 3 bytes: '\x00\x00\x00'
Modifying file's content...
Contents of byte 0: '3'
Contents of first 3 bytes: '3\x00\x00'
Contents of second page: '\x00foobar\x00'
Regex match on mmap (page start, length of match): 1.0 6
Seek to zeroth byte
Seek to 42nd byte
Seek to last byte
Try to seek to negative position...
Try to seek beyond end of mmap...
Try to seek to negative position...
Attempting resize()
Creating 10 byte test data file.
Opening mmap with access=ACCESS_READ
Ensuring that readonly mmap can't be slice assigned.
Ensuring that readonly mmap can't be item assigned.
Ensuring that readonly mmap can't be write() to.
Ensuring that readonly mmap can't be write_byte() to.
Ensuring that readonly mmap can't be resized.
Opening mmap with size too big
Opening mmap with access=ACCESS_WRITE
Modifying write-through memory map.
Opening mmap with access=ACCESS_COPY
Modifying copy-on-write memory map.
Ensuring copy-on-write maps cannot be resized.
Ensuring invalid access parameter raises exception.
Try opening a bad file descriptor...
Ensuring that passing 0 as map length sets map size to current file size.
Ensuring that passing 0 as map length sets map size to current file size.
anonymous mmap.mmap(-1, PAGESIZE)...
Test passed
Lib/test/test_mmap.py
View file @
3163179f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment