diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-01 18:09:36 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-01 18:09:36 -0500 |
commit | 0ef90459f8c249a53a0c5e9daaa8a4cf407f7fe9 (patch) | |
tree | f48b4e1171b71e05bc425703ea65d7038d6b8bd4 /setuptools/tests/test_develop.py | |
parent | 64a3d8b243a2c41dc43b29567652518f1b08992d (diff) | |
download | external_python_setuptools-0ef90459f8c249a53a0c5e9daaa8a4cf407f7fe9.tar.gz external_python_setuptools-0ef90459f8c249a53a0c5e9daaa8a4cf407f7fe9.tar.bz2 external_python_setuptools-0ef90459f8c249a53a0c5e9daaa8a4cf407f7fe9.zip |
Convert test_develop to use pytest
Diffstat (limited to 'setuptools/tests/test_develop.py')
-rw-r--r-- | setuptools/tests/test_develop.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/setuptools/tests/test_develop.py b/setuptools/tests/test_develop.py index 66d182eb..9d8a56c3 100644 --- a/setuptools/tests/test_develop.py +++ b/setuptools/tests/test_develop.py @@ -5,7 +5,6 @@ import shutil import site import sys import tempfile -import unittest from distutils.errors import DistutilsError from setuptools.command.develop import develop @@ -23,9 +22,9 @@ setup(name='foo', INIT_PY = """print "foo" """ -class TestDevelopTest(unittest.TestCase): +class TestDevelopTest: - def setUp(self): + def setup_method(self, method): if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return @@ -50,7 +49,7 @@ class TestDevelopTest(unittest.TestCase): self.old_site = site.USER_SITE site.USER_SITE = tempfile.mkdtemp() - def tearDown(self): + def teardown_method(self, method): if sys.version < "2.6" or hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix): return @@ -86,7 +85,7 @@ class TestDevelopTest(unittest.TestCase): # let's see if we got our egg link at the right place content = os.listdir(site.USER_SITE) content.sort() - self.assertEqual(content, ['easy-install.pth', 'foo.egg-link']) + assert content == ['easy-install.pth', 'foo.egg-link'] # Check that we are using the right code. egg_link_file = open(os.path.join(site.USER_SITE, 'foo.egg-link'), 'rt') @@ -100,9 +99,9 @@ class TestDevelopTest(unittest.TestCase): finally: init_file.close() if sys.version < "3": - self.assertEqual(init, 'print "foo"') + assert init == 'print "foo"' else: - self.assertEqual(init, 'print("foo")') + assert init == 'print("foo")' def notest_develop_with_setup_requires(self): |