summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_resources.py
diff options
context:
space:
mode:
authorrobinjhuang <robin.j.huang@gmail.com>2018-10-27 18:06:46 -0400
committerPaul Ganssle <paul@ganssle.io>2018-10-28 17:45:34 -0400
commit9d63059f112c80d0419bac71596c79cd4660398d (patch)
treec6ee5fb4067eb603a16ce6514ab2e403aefe7677 /pkg_resources/tests/test_resources.py
parentbf1673504ed9705d18ae178b96f57c5784ab4ad7 (diff)
downloadpython-setuptools-git-9d63059f112c80d0419bac71596c79cd4660398d.tar.gz
Add unit tests for PkgResourcesDeprecationWarning
Diffstat (limited to 'pkg_resources/tests/test_resources.py')
-rw-r--r--pkg_resources/tests/test_resources.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 171ba2f9..86afcf74 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -15,7 +15,7 @@ import pkg_resources
from pkg_resources import (
parse_requirements, VersionConflict, parse_version,
Distribution, EntryPoint, Requirement, safe_version, safe_name,
- WorkingSet)
+ WorkingSet, PkgResourcesDeprecationWarning)
# from Python 3.6 docs.
@@ -492,6 +492,15 @@ class TestEntryPoints:
with pytest.raises(ValueError):
EntryPoint.parse_map(self.submap_str)
+ def testDeprecationWarnings(self):
+ ep = EntryPoint(
+ "foo", "pkg_resources.tests.test_resources", ["TestEntryPoints"],
+ ["x"]
+ )
+ with pytest.warns(pkg_resources.PkgResourcesDeprecationWarning):
+ ep.load(require=False)
+
+
class TestRequirements:
def testBasics(self):