Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
a97ed09e
Commit
a97ed09e
authored
May 18, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix local test failures under Python 3.4 having to do with test file encoding issue.
parent
4021f3e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
greentest/testrunner.py
greentest/testrunner.py
+7
-1
No files found.
greentest/testrunner.py
View file @
a97ed09e
...
...
@@ -122,7 +122,13 @@ def discover(tests=None, ignore=None):
default_options
=
{
'timeout'
:
TIMEOUT
}
for
filename
in
tests
:
if
'TESTRUNNER'
in
open
(
filename
).
read
():
with
open
(
filename
,
'rb'
)
as
f
:
# Some of the test files (e.g., test__socket_dns) are
# UTF8 encoded. Depending on the environment, Python 3 may
# try to decode those as ASCII, which fails with UnicodeDecodeError.
# Thus, be sure to open and compare in binary mode.
contents
=
f
.
read
()
if
b'TESTRUNNER'
in
contents
:
module
=
__import__
(
filename
.
rsplit
(
'.'
,
1
)[
0
])
for
cmd
,
options
in
module
.
TESTRUNNER
():
if
remove_options
(
cmd
)[
-
1
]
in
ignore
:
...
...
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