summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_dist.py
diff options
context:
space:
mode:
authorrobinjhuang <robin.j.huang@gmail.com>2018-10-27 18:46:55 -0400
committerPaul Ganssle <paul@ganssle.io>2018-10-28 17:45:42 -0400
commit3a9dc2b03ef313ee7729606fb56ae9b41066dfd1 (patch)
tree661aa631695a78bb6011888cf49edf0b60b7dbd4 /setuptools/tests/test_dist.py
parent9d63059f112c80d0419bac71596c79cd4660398d (diff)
downloadpython-setuptools-git-3a9dc2b03ef313ee7729606fb56ae9b41066dfd1.tar.gz
Add unit tests for setuptools deprecation warnings
These are tests to ensure that the specified deprecation warnings are raised when the functions are called. Co-authored-by: Junhan Huang <robin.j.huang@gmail.com> Co-authored-by: Marton Pono <marci93@gmail.com>
Diffstat (limited to 'setuptools/tests/test_dist.py')
-rw-r--r--setuptools/tests/test_dist.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py
index 5162e1c9..223ad90c 100644
--- a/setuptools/tests/test_dist.py
+++ b/setuptools/tests/test_dist.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import io
-
+from setuptools.dist import DistDeprecationWarning, _get_unpatched
from setuptools import Distribution
from setuptools.extern.six.moves.urllib.request import pathname2url
from setuptools.extern.six.moves.urllib_parse import urljoin
@@ -56,6 +56,9 @@ def test_dist_fetch_build_egg(tmpdir):
assert [dist.key for dist in resolved_dists if dist] == reqs
+def test_dist__get_unpatched_deprecated():
+ pytest.warns(DistDeprecationWarning, _get_unpatched, [""])
+
def __maintainer_test_cases():
attrs = {"name": "package",
"version": "1.0",