summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-12-29 14:49:47 -0500
committerJason R. Coombs <jaraco@jaraco.com>2014-12-29 14:49:47 -0500
commit80561b7f0bb7cf8488e342ee853ac9aff107b021 (patch)
tree1e50822326168349353f43ee022159717c2630b8 /setuptools/tests/test_easy_install.py
parent195076859f1716ec22ea08dc1b29de47fca7af0c (diff)
downloadpython-setuptools-git-80561b7f0bb7cf8488e342ee853ac9aff107b021.tar.gz
Use pytest to capture exception
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 6358c934..530f89f3 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -12,6 +12,8 @@ import tarfile
import logging
import distutils.core
+import pytest
+
from setuptools.compat import StringIO, BytesIO, urlparse
from setuptools.sandbox import run_setup, SandboxViolation
from setuptools.command.easy_install import (
@@ -278,8 +280,8 @@ class TestSetupRequires(unittest.TestCase):
with argv_context(['easy_install']):
# attempt to install the dist. It should fail because
# it doesn't exist.
- self.assertRaises(SystemExit,
- easy_install_pkg.main, ei_params)
+ with pytest.raises(SystemExit):
+ easy_install_pkg.main(ei_params)
# there should have been two or three requests to the server
# (three happens on Python 3.3a)
self.assertTrue(2 <= len(p_index.requests) <= 3)