aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-12-15 20:24:46 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-12-15 20:24:46 -0500
commit42a792c3a4047d79027f7078a72238d5fb60294b (patch)
tree36e3caf6ccaad3868defacdfa5bf0eef488e852e /setuptools/tests
parentcafe49ae0c7c4914c469d8bd368185aebc29b4ca (diff)
downloadexternal_python_setuptools-42a792c3a4047d79027f7078a72238d5fb60294b.tar.gz
external_python_setuptools-42a792c3a4047d79027f7078a72238d5fb60294b.tar.bz2
external_python_setuptools-42a792c3a4047d79027f7078a72238d5fb60294b.zip
Add test for download_svn, improving coverage on patch
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_packageindex.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
index 1f6bc797..b7276682 100644
--- a/setuptools/tests/test_packageindex.py
+++ b/setuptools/tests/test_packageindex.py
@@ -262,6 +262,22 @@ class TestPackageIndex:
).format(**locals())
os_system_mock.assert_called_once_with(expected)
+ def test_download_svn(self, tmpdir):
+ 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))
+
+ os_system_mock.assert_called()
+
+ expected_dir = str(tmpdir / 'project')
+ expected = (
+ 'svn checkout -q '
+ 'svn+https://svn.example/project {expected_dir}'
+ ).format(**locals())
+ os_system_mock.assert_called_once_with(expected)
+
class TestContentCheckers:
def test_md5(self):