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
7b50c2c6
Commit
7b50c2c6
authored
Mar 06, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix buildbot failure following 97a5590b9291
parent
16a0a0b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_mmap.py
Lib/test/test_mmap.py
+3
-3
No files found.
Lib/test/test_mmap.py
View file @
7b50c2c6
...
@@ -237,14 +237,14 @@ class MmapTests(unittest.TestCase):
...
@@ -237,14 +237,14 @@ class MmapTests(unittest.TestCase):
prot
=
mmap
.
PROT_READ
,
access
=
mmap
.
ACCESS_WRITE
)
prot
=
mmap
.
PROT_READ
,
access
=
mmap
.
ACCESS_WRITE
)
f
.
close
()
f
.
close
()
# Try writting without PROT_WRITE
# Try writing with PROT_EXEC and without PROT_WRITE
prot
=
mmap
.
PROT_READ
|
getattr
(
mmap
,
'PROT_EXEC'
,
0
)
with
open
(
TESTFN
,
"r+b"
)
as
f
:
with
open
(
TESTFN
,
"r+b"
)
as
f
:
m
=
mmap
.
mmap
(
f
.
fileno
(),
mapsize
,
prot
=
~
mmap
.
PROT_WRITE
)
m
=
mmap
.
mmap
(
f
.
fileno
(),
mapsize
,
prot
=
prot
)
self
.
assertRaises
(
TypeError
,
m
.
write
,
b"abcdef"
)
self
.
assertRaises
(
TypeError
,
m
.
write
,
b"abcdef"
)
self
.
assertRaises
(
TypeError
,
m
.
write_byte
,
0
)
self
.
assertRaises
(
TypeError
,
m
.
write_byte
,
0
)
m
.
close
()
m
.
close
()
def
test_bad_file_desc
(
self
):
def
test_bad_file_desc
(
self
):
# Try opening a bad file descriptor...
# Try opening a bad file descriptor...
self
.
assertRaises
(
mmap
.
error
,
mmap
.
mmap
,
-
2
,
4096
)
self
.
assertRaises
(
mmap
.
error
,
mmap
.
mmap
,
-
2
,
4096
)
...
...
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