Commit a0735f22 authored by Paul Ganssle's avatar Paul Ganssle

Assert that warning is raised with svn downloads

This both prevents the warning from surfacing during the tests and
ensures that no regressions occur.
parent b78994aa
...@@ -7,6 +7,7 @@ import distutils.errors ...@@ -7,6 +7,7 @@ import distutils.errors
from setuptools.extern import six from setuptools.extern import six
from setuptools.extern.six.moves import urllib, http_client from setuptools.extern.six.moves import urllib, http_client
import mock import mock
import pytest
import pkg_resources import pkg_resources
import setuptools.package_index import setuptools.package_index
...@@ -266,8 +267,9 @@ class TestPackageIndex: ...@@ -266,8 +267,9 @@ class TestPackageIndex:
url = 'svn+https://svn.example/project#egg=foo' url = 'svn+https://svn.example/project#egg=foo'
index = setuptools.package_index.PackageIndex() index = setuptools.package_index.PackageIndex()
with mock.patch("os.system") as os_system_mock: with pytest.warns(UserWarning):
result = index.download(url, str(tmpdir)) with mock.patch("os.system") as os_system_mock:
result = index.download(url, str(tmpdir))
os_system_mock.assert_called() os_system_mock.assert_called()
......
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