[Python-checkins] distutils2: Use the same name everywhere.
tarek.ziade
python-checkins at python.org
Wed Jun 2 01:18:23 CEST 2010
tarek.ziade pushed ccaea7a5f39d to distutils2:
http://hg.python.org/distutils2/rev/ccaea7a5f39d
changeset: 190:ccaea7a5f39d
parent: 188:b7fd258b33e7
user: ?ric Araujo <merwok at netwok.org>
date: Mon May 31 21:58:31 2010 +0200
summary: Use the same name everywhere.
files: src/distutils2/_backport/tests/test_sysconfig.py, src/distutils2/tests/test_check.py, src/distutils2/tests/test_metadata.py, src/distutils2/tests/test_upload.py
diff --git a/src/distutils2/_backport/tests/test_sysconfig.py b/src/distutils2/_backport/tests/test_sysconfig.py
--- a/src/distutils2/_backport/tests/test_sysconfig.py
+++ b/src/distutils2/_backport/tests/test_sysconfig.py
@@ -97,7 +97,7 @@
substitution key (which would be weird).
"""
- self.failUnlessEqual(_subst_vars('{py{version}}', {'version': '31'}), '{py31}')
+ self.assertEqual(_subst_vars('{py{version}}', {'version': '31'}), '{py31}')
def test_get_paths(self):
scheme = get_paths()
diff --git a/src/distutils2/tests/test_check.py b/src/distutils2/tests/test_check.py
--- a/src/distutils2/tests/test_check.py
+++ b/src/distutils2/tests/test_check.py
@@ -27,7 +27,7 @@
# by default, check is checking the metadata
# should have some warnings
cmd = self._run()
- self.assert_(len(cmd._warnings) > 0)
+ self.assertTrue(len(cmd._warnings) > 0)
# now let's add the required fields
# and run it again, to make sure we don't get
diff --git a/src/distutils2/tests/test_metadata.py b/src/distutils2/tests/test_metadata.py
--- a/src/distutils2/tests/test_metadata.py
+++ b/src/distutils2/tests/test_metadata.py
@@ -64,7 +64,7 @@
res = res.read()
f = open(PKG_INFO)
wanted = f.read()
- self.assert_('Keywords: keyring,password,crypt' in res)
+ self.assertTrue('Keywords: keyring,password,crypt' in res)
f.close()
def test_metadata_markers(self):
diff --git a/src/distutils2/tests/test_upload.py b/src/distutils2/tests/test_upload.py
--- a/src/distutils2/tests/test_upload.py
+++ b/src/distutils2/tests/test_upload.py
@@ -116,7 +116,7 @@
# what did we send ?
self.assertIn('dédé', self.last_open.req.data)
headers = dict(self.last_open.req.headers)
- self.assert_(headers['Content-length'] > 2000)
+ self.assertTrue(headers['Content-length'] > 2000)
self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
self.assertEquals(self.last_open.req.get_method(), 'POST')
self.assertEquals(self.last_open.req.get_full_url(),
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list