Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Boxiang Sun
cython
Commits
f6f110e1
Commit
f6f110e1
authored
Feb 22, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverage: read Cython source files with correct encoding
parent
b2f964b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Coverage.py
Cython/Coverage.py
+3
-3
No files found.
Cython/Coverage.py
View file @
f6f110e1
...
...
@@ -10,7 +10,7 @@ from collections import defaultdict
from
coverage.plugin
import
CoveragePlugin
,
FileTracer
,
FileReporter
# requires coverage.py 4.0+
from
.Utils
import
find_root_package_dir
,
is_package_dir
from
.Utils
import
find_root_package_dir
,
is_package_dir
,
open_source_file
from
.
import
__version__
...
...
@@ -238,7 +238,7 @@ class CythonModuleReporter(FileReporter):
def
source
(
self
):
if
os
.
path
.
exists
(
self
.
filename
):
with
open
(
self
.
filename
)
as
f
:
with
open
_source_file
(
self
.
filename
)
as
f
:
return
f
.
read
()
else
:
return
'
\
n
'
.
join
(
...
...
@@ -247,7 +247,7 @@ class CythonModuleReporter(FileReporter):
def
source_token_lines
(
self
):
if
os
.
path
.
exists
(
self
.
filename
):
with
open
(
self
.
filename
)
as
f
:
with
open
_source_file
(
self
.
filename
)
as
f
:
for
line
in
f
:
yield
[(
'txt'
,
line
.
rstrip
(
'
\
n
'
))]
else
:
...
...
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