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
253a843f
Commit
253a843f
authored
Jan 13, 2013
by
Eli Bendersky
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
45839901
c78de469
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
Lib/test/test_asyncore.py
Lib/test/test_asyncore.py
+1
-1
Lib/test/test_posix.py
Lib/test/test_posix.py
+10
-10
No files found.
Lib/test/test_asyncore.py
View file @
253a843f
...
@@ -789,7 +789,7 @@ class BaseTestAPI:
...
@@ -789,7 +789,7 @@ class BaseTestAPI:
t
=
threading
.
Thread
(
target
=
lambda
:
asyncore
.
loop
(
timeout
=
0.1
,
t
=
threading
.
Thread
(
target
=
lambda
:
asyncore
.
loop
(
timeout
=
0.1
,
count
=
500
))
count
=
500
))
t
.
start
()
t
.
start
()
self
.
addCleanup
(
t
.
join
)
s
=
socket
.
socket
(
self
.
family
,
socket
.
SOCK_STREAM
)
s
=
socket
.
socket
(
self
.
family
,
socket
.
SOCK_STREAM
)
s
.
settimeout
(.
2
)
s
.
settimeout
(.
2
)
...
...
Lib/test/test_posix.py
View file @
253a843f
...
@@ -930,17 +930,17 @@ class PosixTester(unittest.TestCase):
...
@@ -930,17 +930,17 @@ class PosixTester(unittest.TestCase):
self
.
assertRaises
(
OSError
,
posix
.
sched_getparam
,
-
1
)
self
.
assertRaises
(
OSError
,
posix
.
sched_getparam
,
-
1
)
param
=
posix
.
sched_getparam
(
0
)
param
=
posix
.
sched_getparam
(
0
)
self
.
assertIsInstance
(
param
.
sched_priority
,
int
)
self
.
assertIsInstance
(
param
.
sched_priority
,
int
)
try
:
posix
.
sched_setscheduler
(
0
,
mine
,
param
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EPERM
:
raise
# POSIX states that calling sched_setparam() on a process with a
# POSIX states that calling sched_setparam() or sched_setscheduler() on
# scheduling policy other than SCHED_FIFO or SCHED_RR is
# a process with a scheduling policy other than SCHED_FIFO or SCHED_RR
# implementation-defined: FreeBSD returns EINVAL.
# is implementation-defined: NetBSD and FreeBSD can return EINVAL.
if
not
sys
.
platform
.
startswith
(
'freebsd'
):
if
not
sys
.
platform
.
startswith
((
'freebsd'
,
'netbsd'
)):
posix
.
sched_setparam
(
0
,
param
)
try
:
posix
.
sched_setscheduler
(
0
,
mine
,
param
)
posix
.
sched_setparam
(
0
,
param
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EPERM
:
raise
self
.
assertRaises
(
OSError
,
posix
.
sched_setparam
,
-
1
,
param
)
self
.
assertRaises
(
OSError
,
posix
.
sched_setparam
,
-
1
,
param
)
self
.
assertRaises
(
OSError
,
posix
.
sched_setscheduler
,
-
1
,
mine
,
param
)
self
.
assertRaises
(
OSError
,
posix
.
sched_setscheduler
,
-
1
,
mine
,
param
)
...
...
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