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
c0fcc028
Commit
c0fcc028
authored
Jun 24, 2012
by
Hynek Schlawack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix whitespace
parent
774f948b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_posix.py
Lib/test/test_posix.py
+3
-3
No files found.
Lib/test/test_posix.py
View file @
c0fcc028
...
...
@@ -1015,19 +1015,19 @@ class PosixTester(unittest.TestCase):
@
unittest
.
skipIf
(
sys
.
platform
==
'freebsd9'
,
"Skip test because known kernel bug - "
\
"http://lists.freebsd.org/pipermail/freebsd-amd64/2012-January/014332.html"
)
def
test_fs_holes
(
self
)
:
def
test_fs_holes
(
self
):
# Even if the filesystem doesn't report holes,
# if the OS supports it the SEEK_* constants
# will be defined and will have a consistent
# behaviour:
# os.SEEK_DATA = current position
# os.SEEK_HOLE = end of file position
with
open
(
support
.
TESTFN
,
'r+b'
)
as
fp
:
with
open
(
support
.
TESTFN
,
'r+b'
)
as
fp
:
fp
.
write
(
b"hello"
)
fp
.
flush
()
size
=
fp
.
tell
()
fno
=
fp
.
fileno
()
for
i
in
range
(
size
)
:
for
i
in
range
(
size
):
self
.
assertEqual
(
i
,
os
.
lseek
(
fno
,
i
,
os
.
SEEK_DATA
))
self
.
assertLessEqual
(
size
,
os
.
lseek
(
fno
,
i
,
os
.
SEEK_HOLE
))
self
.
assertRaises
(
OSError
,
os
.
lseek
,
fno
,
size
,
os
.
SEEK_DATA
)
...
...
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