Commit 56bcce89 authored by Miro Hrončok's avatar Miro Hrončok

Reuse @ack_2to3 in TestDevelop.test_2to3_user_mode

Fixes https://github.com/pypa/setuptools/issues/2100
parent 030c8366
Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``.
...@@ -6,7 +6,7 @@ from setuptools.extern.six import PY2, PY3 ...@@ -6,7 +6,7 @@ from setuptools.extern.six import PY2, PY3
__all__ = [ __all__ = [
'fail_on_ascii', 'py2_only', 'py3_only' 'fail_on_ascii', 'py2_only', 'py3_only', 'ack_2to3'
] ]
...@@ -16,3 +16,5 @@ fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale") ...@@ -16,3 +16,5 @@ fail_on_ascii = pytest.mark.xfail(is_ascii, reason="Test fails in this locale")
py2_only = pytest.mark.skipif(not PY2, reason="Test runs on Python 2 only") 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") py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only")
ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')
...@@ -17,6 +17,7 @@ import pytest ...@@ -17,6 +17,7 @@ import pytest
from setuptools.command.develop import develop from setuptools.command.develop import develop
from setuptools.dist import Distribution from setuptools.dist import Distribution
from setuptools.tests import ack_2to3
from . import contexts from . import contexts
from . import namespaces from . import namespaces
...@@ -65,6 +66,7 @@ class TestDevelop: ...@@ -65,6 +66,7 @@ class TestDevelop:
@pytest.mark.skipif( @pytest.mark.skipif(
in_virtualenv or in_venv, in_virtualenv or in_venv,
reason="Cannot run when invoked in a virtualenv or venv") reason="Cannot run when invoked in a virtualenv or venv")
@ack_2to3
def test_2to3_user_mode(self, test_env): def test_2to3_user_mode(self, test_env):
settings = dict( settings = dict(
name='foo', name='foo',
......
...@@ -10,6 +10,7 @@ import pytest ...@@ -10,6 +10,7 @@ import pytest
from setuptools.command.test import test from setuptools.command.test import test
from setuptools.dist import Distribution from setuptools.dist import Distribution
from setuptools.tests import ack_2to3
from .textwrap import DALS from .textwrap import DALS
...@@ -73,9 +74,6 @@ def quiet_log(): ...@@ -73,9 +74,6 @@ def quiet_log():
log.set_verbosity(0) log.set_verbosity(0)
ack_2to3 = pytest.mark.filterwarnings('ignore:2to3 support is deprecated')
@pytest.mark.usefixtures('sample_test', 'quiet_log') @pytest.mark.usefixtures('sample_test', 'quiet_log')
@ack_2to3 @ack_2to3
def test_test(capfd): def test_test(capfd):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment