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
e7a27ca0
Commit
e7a27ca0
authored
Mar 31, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract separate test for test_environment_markers in test_resources. Remove unused variable.
parent
9332edbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
pkg_resources/tests/test_resources.py
pkg_resources/tests/test_resources.py
+6
-2
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+2
-2
No files found.
pkg_resources/tests/test_resources.py
View file @
e7a27ca0
...
...
@@ -182,8 +182,12 @@ class TestDistro:
msg
=
'Foo 0.9 is installed but Foo==1.2 is required'
assert
vc
.
value
.
report
()
==
msg
ws
=
WorkingSet
([])
# reset
# Environment markers are evaluated at resolution time
def
test_environment_markers
(
self
):
"""
Environment markers are evaluated at resolution time.
"""
ad
=
pkg_resources
.
Environment
([])
ws
=
WorkingSet
([])
res
=
ws
.
resolve
(
parse_requirements
(
"Foo;python_version<'2'"
),
ad
)
assert
list
(
res
)
==
[]
...
...
setuptools/tests/test_egg_info.py
View file @
e7a27ca0
...
...
@@ -123,7 +123,7 @@ class TestEggInfo(object):
def
test_tests_require_with_markers
(
self
,
tmpdir_cwd
,
env
):
self
.
_setup_script_with_requires
(
"""tests_require=["barbazquux;python_version<'2'"],"""
)
data
=
self
.
_run_install_command
(
self
.
_run_install_command
(
tmpdir_cwd
,
env
,
cmd
=
[
'test'
],
output
=
"Ran 0 tests in"
)
assert
glob
.
glob
(
os
.
path
.
join
(
env
.
paths
[
'lib'
],
'barbazquux*'
))
==
[]
...
...
@@ -154,7 +154,7 @@ class TestEggInfo(object):
if
code
:
raise
AssertionError
(
data
)
if
output
:
assert
output
in
data
assert
output
in
data
def
_find_egg_info_files
(
self
,
root
):
class
DirList
(
list
):
...
...
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