aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_packageindex.py
diff options
context:
space:
mode:
authorLennart Regebro <regebro@gmail.com>2012-08-22 16:41:06 +0200
committerLennart Regebro <regebro@gmail.com>2012-08-22 16:41:06 +0200
commite743dabde0d60aaeca5c9e4dc5c29ac3ac625646 (patch)
tree762c1a2b019343b1ff29be16441ae3560d9eba50 /setuptools/tests/test_packageindex.py
parentec0ed85656b96812402439fa23c877fd27b99de5 (diff)
downloadexternal_python_setuptools-e743dabde0d60aaeca5c9e4dc5c29ac3ac625646.tar.gz
external_python_setuptools-e743dabde0d60aaeca5c9e4dc5c29ac3ac625646.tar.bz2
external_python_setuptools-e743dabde0d60aaeca5c9e4dc5c29ac3ac625646.zip
Got rid of deprecated assert_ and assertEquals.
--HG-- branch : distribute extra : rebase_source : 9d7032bac7db98e445ab6a46b2610c278c691c2d
Diffstat (limited to 'setuptools/tests/test_packageindex.py')
-rw-r--r--setuptools/tests/test_packageindex.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
index 886befcb..3e446b54 100644
--- a/setuptools/tests/test_packageindex.py
+++ b/setuptools/tests/test_packageindex.py
@@ -17,9 +17,9 @@ class TestPackageIndex(unittest.TestCase):
try:
v = index.open_url(url)
except Exception, v:
- self.assert_(url in str(v))
+ self.assertTrue(url in str(v))
else:
- self.assert_(isinstance(v,urllib2.HTTPError))
+ self.assertTrue(isinstance(v,urllib2.HTTPError))
def test_bad_url_typo(self):
# issue 16
@@ -33,9 +33,9 @@ class TestPackageIndex(unittest.TestCase):
try:
v = index.open_url(url)
except Exception, v:
- self.assert_(url in str(v))
+ self.assertTrue(url in str(v))
else:
- self.assert_(isinstance(v, urllib2.HTTPError))
+ self.assertTrue(isinstance(v, urllib2.HTTPError))
def test_bad_url_bad_status_line(self):
index = setuptools.package_index.PackageIndex(
@@ -53,7 +53,7 @@ class TestPackageIndex(unittest.TestCase):
try:
v = index.open_url(url)
except Exception, v:
- self.assert_('line' in str(v))
+ self.assertTrue('line' in str(v))
else:
raise AssertionError('Should have raise here!')
finally:
@@ -95,7 +95,7 @@ class TestPackageIndex(unittest.TestCase):
hosts=('www.example.com',)
)
url = 'file:///tmp/test_package_index'
- self.assert_(index.url_ok(url, True))
+ self.assertTrue(index.url_ok(url, True))
def test_links_priority(self):
"""
@@ -128,11 +128,11 @@ class TestPackageIndex(unittest.TestCase):
server.stop()
# the distribution has been found
- self.assert_('foobar' in pi)
+ self.assertTrue('foobar' in pi)
# we have only one link, because links are compared without md5
- self.assert_(len(pi['foobar'])==1)
+ self.assertTrue(len(pi['foobar'])==1)
# the link should be from the index
- self.assert_('correct_md5' in pi['foobar'][0].location)
+ self.assertTrue('correct_md5' in pi['foobar'][0].location)
def test_parse_bdist_wininst(self):
self.assertEqual(setuptools.package_index.parse_bdist_wininst(