diff options
author | Paul Ganssle <paul@ganssle.io> | 2018-12-28 09:52:02 -0500 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-12-28 09:52:02 -0500 |
commit | a0735f223b82695cc45eb127e072496aa1dbe8f0 (patch) | |
tree | 21bd5d1584e7640a9e6095b99cccc77209e752a2 | |
parent | b78994aa19ae0705f60e3b4b1e4087ecbe4ff0f5 (diff) | |
download | python-setuptools-git-a0735f223b82695cc45eb127e072496aa1dbe8f0.tar.gz |
Assert that warning is raised with svn downloads
This both prevents the warning from surfacing during the tests and
ensures that no regressions occur.
-rw-r--r-- | setuptools/tests/test_packageindex.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py index b7276682..13cffb7e 100644 --- a/setuptools/tests/test_packageindex.py +++ b/setuptools/tests/test_packageindex.py @@ -7,6 +7,7 @@ import distutils.errors from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client import mock +import pytest import pkg_resources import setuptools.package_index @@ -266,8 +267,9 @@ class TestPackageIndex: url = 'svn+https://svn.example/project#egg=foo' index = setuptools.package_index.PackageIndex() - with mock.patch("os.system") as os_system_mock: - result = index.download(url, str(tmpdir)) + with pytest.warns(UserWarning): + with mock.patch("os.system") as os_system_mock: + result = index.download(url, str(tmpdir)) os_system_mock.assert_called() |