Skip to content

Commit

Permalink
Merge pull request #2105 from hroncok/ack_2to3
Browse files Browse the repository at this point in the history
Reuse @ack_2to3 in TestDevelop.test_2to3_user_mode
  • Loading branch information
jaraco authored May 13, 2020
2 parents faaaea0 + 56bcce8 commit 36f9289
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/2105.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``.
4 changes: 3 additions & 1 deletion setuptools/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


__all__ = [
'fail_on_ascii', 'py2_only', 'py3_only'
'fail_on_ascii', 'py2_only', 'py3_only', 'ack_2to3'
]


Expand All @@ -16,3 +16,5 @@

py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only")
py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only")

ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')
2 changes: 2 additions & 0 deletions setuptools/tests/test_develop.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from setuptools.command.develop import develop
from setuptools.dist import Distribution
from setuptools.tests import ack_2to3
from . import contexts
from . import namespaces

Expand Down Expand Up @@ -65,6 +66,7 @@ class TestDevelop:
@pytest.mark.skipif(
in_virtualenv or in_venv,
reason="Cannot run when invoked in a virtualenv or venv")
@ack_2to3
def test_2to3_user_mode(self, test_env):
settings = dict(
name='foo',
Expand Down
4 changes: 1 addition & 3 deletions setuptools/tests/test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from setuptools.command.test import test
from setuptools.dist import Distribution
from setuptools.tests import ack_2to3

from .textwrap import DALS

Expand Down Expand Up @@ -73,9 +74,6 @@ def quiet_log():
log.set_verbosity(0)


ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')


@pytest.mark.usefixtures('sample_test', 'quiet_log')
@ack_2to3
def test_test(capfd):
Expand Down

0 comments on commit 36f9289

Please sign in to comment.