File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def test_detect_source_encoding(self):
128
128
)
129
129
130
130
def test_detect_source_encoding_not_in_comment (self ):
131
- if env .PYPY and env .PY3 : # pramga : no metacov
131
+ if env .PYPY and env .PY3 : # pragma : no metacov
132
132
# PyPy3 gets this case wrong. Not sure what I can do about it,
133
133
# so skip the test.
134
134
self .skipTest ("PyPy3 is wrong about non-comment encoding. Skip it." )
Original file line number Diff line number Diff line change 4
4
5
5
"""Tests for process behavior of coverage.py."""
6
6
7
+ import distutils .sysconfig # pylint: disable=import-error
7
8
import glob
8
9
import os
9
10
import os .path
@@ -1173,17 +1174,16 @@ def test_accented_directory(self):
1173
1174
1174
1175
def possible_pth_dirs ():
1175
1176
"""Produce a sequence of directories for trying to write .pth files."""
1176
- # First look through sys.path, and we find a .pth file, then it's a good
1177
+ # First look through sys.path, and if we find a .pth file, then it's a good
1177
1178
# place to put ours.
1178
- for d in sys .path :
1179
- g = glob .glob (os .path .join (d , "*.pth" ))
1180
- if g :
1181
- yield d
1179
+ for pth_dir in sys .path : # pragma: part covered
1180
+ pth_files = glob .glob (os .path .join (pth_dir , "*.pth" ))
1181
+ if pth_files :
1182
+ yield pth_dir
1182
1183
1183
1184
# If we're still looking, then try the Python library directory.
1184
1185
# https://bitbucket.org/ned/coveragepy/issue/339/pth-test-malfunctions
1185
- import distutils .sysconfig # pylint: disable=import-error
1186
- yield distutils .sysconfig .get_python_lib ()
1186
+ yield distutils .sysconfig .get_python_lib () # pragma: cant happen
1187
1187
1188
1188
1189
1189
def find_writable_pth_directory ():
You can’t perform that action at this time.
0 commit comments