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
30b66d8d
Commit
30b66d8d
authored
Dec 20, 2020
by
Jason R. Coombs
Committed by
GitHub
Dec 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2487 from yan12125/fix-tests-pytest-6.2
Fix tests with pytest 6.2
parents
f8096a1f
701eee9e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
15 deletions
+16
-15
changelog.d/2487.misc.rst
changelog.d/2487.misc.rst
+2
-0
pkg_resources/tests/test_resources.py
pkg_resources/tests/test_resources.py
+2
-2
setuptools/tests/fixtures.py
setuptools/tests/fixtures.py
+2
-2
setuptools/tests/test_develop.py
setuptools/tests/test_develop.py
+2
-2
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+3
-3
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+1
-1
setuptools/tests/test_msvc.py
setuptools/tests/test_msvc.py
+3
-3
setuptools/tests/test_virtualenv.py
setuptools/tests/test_virtualenv.py
+1
-2
No files found.
changelog.d/2487.misc.rst
0 → 100644
View file @
30b66d8d
Fix tests with pytest 6.2
-- by :user:`yan12125`
pkg_resources/tests/test_resources.py
View file @
30b66d8d
...
...
@@ -773,7 +773,7 @@ class TestNamespaces:
ns_str
=
"__import__('pkg_resources').declare_namespace(__name__)
\
n
"
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
symlinked_tmpdir
(
self
,
tmpdir
):
"""
Where available, return the tempdir as a symlink,
...
...
@@ -791,7 +791,7 @@ class TestNamespaces:
finally
:
os
.
unlink
(
link_name
)
@
pytest
.
yield_
fixture
(
autouse
=
True
)
@
pytest
.
fixture
(
autouse
=
True
)
def
patched_path
(
self
,
tmpdir
):
"""
Patch sys.path to include the 'site-pkgs' dir. Also
...
...
setuptools/tests/fixtures.py
View file @
30b66d8d
...
...
@@ -3,7 +3,7 @@ import pytest
from
.
import
contexts
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
user_override
(
monkeypatch
):
"""
Override site.USER_BASE and site.USER_SITE with temporary directories in
...
...
@@ -17,7 +17,7 @@ def user_override(monkeypatch):
yield
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
tmpdir_cwd
(
tmpdir
):
with
tmpdir
.
as_cwd
()
as
orig
:
yield
orig
setuptools/tests/test_develop.py
View file @
30b66d8d
...
...
@@ -31,7 +31,7 @@ INIT_PY = """print "foo"
"""
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
temp_user
(
monkeypatch
):
with
contexts
.
tempdir
()
as
user_base
:
with
contexts
.
tempdir
()
as
user_site
:
...
...
@@ -40,7 +40,7 @@ def temp_user(monkeypatch):
yield
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
test_env
(
tmpdir
,
temp_user
):
target
=
tmpdir
foo
=
target
.
mkdir
(
'foo'
)
...
...
setuptools/tests/test_easy_install.py
View file @
30b66d8d
...
...
@@ -305,7 +305,7 @@ class TestPTHFileWriter:
assert
not
pth
.
dirty
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
setup_context
(
tmpdir
):
with
(
tmpdir
/
'setup.py'
).
open
(
'w'
)
as
f
:
f
.
write
(
SETUP_PY
)
...
...
@@ -361,7 +361,7 @@ class TestUserInstallTest:
f
.
write
(
'Name: foo
\
n
'
)
return
str
(
tmpdir
)
@
pytest
.
yield_
fixture
()
@
pytest
.
fixture
()
def
install_target
(
self
,
tmpdir
):
target
=
str
(
tmpdir
)
with
mock
.
patch
(
'sys.path'
,
sys
.
path
+
[
target
]):
...
...
@@ -406,7 +406,7 @@ class TestUserInstallTest:
)
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
distutils_package
():
distutils_setup_py
=
SETUP_PY
.
replace
(
'from setuptools import setup'
,
...
...
setuptools/tests/test_egg_info.py
View file @
30b66d8d
...
...
@@ -45,7 +45,7 @@ class TestEggInfo:
"""
)
})
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
env
(
self
):
with
contexts
.
tempdir
(
prefix
=
'setuptools-test.'
)
as
env_dir
:
env
=
Environment
(
env_dir
)
...
...
setuptools/tests/test_msvc.py
View file @
30b66d8d
...
...
@@ -88,7 +88,7 @@ class TestModulePatch:
assert
isinstance
(
exc
,
expected
)
assert
'aka.ms/vcpython27'
in
str
(
exc
)
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
user_preferred_setting
(
self
):
"""
Set up environment with different install dirs for user vs. system
...
...
@@ -116,7 +116,7 @@ class TestModulePatch:
expected
=
os
.
path
.
join
(
user_preferred_setting
,
'vcvarsall.bat'
)
assert
expected
==
result
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
local_machine_setting
(
self
):
"""
Set up environment with only the system environment configured.
...
...
@@ -138,7 +138,7 @@ class TestModulePatch:
expected
=
os
.
path
.
join
(
local_machine_setting
,
'vcvarsall.bat'
)
assert
expected
==
result
@
pytest
.
yield_
fixture
@
pytest
.
fixture
def
x64_preferred_setting
(
self
):
"""
Set up environment with 64-bit and 32-bit system settings configured
...
...
setuptools/tests/test_virtualenv.py
View file @
30b66d8d
...
...
@@ -5,7 +5,6 @@ import sys
import
pathlib
import
pytest
from
pytest
import
yield_fixture
from
pytest_fixture_config
import
yield_requires_config
import
pytest_virtualenv
...
...
@@ -29,7 +28,7 @@ def pytest_virtualenv_works(virtualenv):
@
yield_requires_config
(
pytest_virtualenv
.
CONFIG
,
[
'virtualenv_executable'
])
@
yield_
fixture
(
scope
=
'function'
)
@
pytest
.
fixture
(
scope
=
'function'
)
def
bare_virtualenv
():
""" Bare virtualenv (no pip/setuptools/wheel).
"""
...
...
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