Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
651f97af
Commit
651f97af
authored
Sep 29, 2017
by
Jason R. Coombs
Committed by
GitHub
Sep 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1152 from jdufresne/resource-warnings
Clean up resource warnings during tests
parents
f7ac2329
b1e47b43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
pkg_resources/__init__.py
pkg_resources/__init__.py
+5
-1
pkg_resources/tests/test_pkg_resources.py
pkg_resources/tests/test_pkg_resources.py
+2
-2
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+4
-2
No files found.
pkg_resources/__init__.py
View file @
651f97af
...
...
@@ -2124,7 +2124,11 @@ def non_empty_lines(path):
"""
Yield
non
-
empty
lines
from
file
at
path
"""
return (line.rstrip() for line in open(path) if line.strip())
with open(path) as f:
for line in f:
line = line.strip()
if line:
yield line
def resolve_egg_link(path):
...
...
pkg_resources/tests/test_pkg_resources.py
View file @
651f97af
...
...
@@ -92,8 +92,8 @@ class TestZipProvider(object):
ts
=
timestamp
(
self
.
ref_time
)
os
.
utime
(
filename
,
(
ts
,
ts
))
filename
=
zp
.
get_resource_filename
(
manager
,
'data.dat'
)
f
=
open
(
filename
)
assert
f
.
read
()
==
'hello, world!'
with
open
(
filename
)
as
f
:
assert
f
.
read
()
==
'hello, world!'
manager
.
cleanup_resources
()
...
...
setuptools/tests/test_egg_info.py
View file @
651f97af
...
...
@@ -164,7 +164,8 @@ class TestEggInfo(object):
self
.
_run_install_command
(
tmpdir_cwd
,
env
)
egg_info_dir
=
self
.
_find_egg_info_files
(
env
.
paths
[
'lib'
]).
base
sources_txt
=
os
.
path
.
join
(
egg_info_dir
,
'SOURCES.txt'
)
assert
'docs/usage.rst'
in
open
(
sources_txt
).
read
().
split
(
'
\
n
'
)
with
open
(
sources_txt
)
as
f
:
assert
'docs/usage.rst'
in
f
.
read
().
split
(
'
\
n
'
)
def
_setup_script_with_requires
(
self
,
requires
,
use_setup_cfg
=
False
):
setup_script
=
DALS
(
...
...
@@ -447,7 +448,8 @@ class TestEggInfo(object):
self
.
_run_install_command
(
tmpdir_cwd
,
env
)
egg_info_dir
=
self
.
_find_egg_info_files
(
env
.
paths
[
'lib'
]).
base
pkginfo
=
os
.
path
.
join
(
egg_info_dir
,
'PKG-INFO'
)
assert
'Requires-Python: >=1.2.3'
in
open
(
pkginfo
).
read
().
split
(
'
\
n
'
)
with
open
(
pkginfo
)
as
f
:
assert
'Requires-Python: >=1.2.3'
in
f
.
read
().
split
(
'
\
n
'
)
def
test_manifest_maker_warning_suppression
(
self
):
fixtures
=
[
...
...
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