aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/__init__.py
blob: 6377d7857de1964a2165906ff31c3547cf46a203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import locale

import pytest

from setuptools.extern.six import PY2, PY3


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


is_ascii = locale.getpreferredencoding() == 'ANSI_X3.4-1968'
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")
py3_only = pytest.mark.skipif(not PY3, reason="Test runs on Python 3 only")

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