[Python-checkins] distutils2: False friend fix

tarek.ziade python-checkins at python.org
Thu Jun 24 10:05:21 CEST 2010


tarek.ziade pushed 0d6d7738c677 to distutils2:

http://hg.python.org/distutils2/rev/0d6d7738c677
changeset:   227:0d6d7738c677
user:        ?ric Araujo <merwok at netwok.org>
date:        Thu Jun 17 19:14:16 2010 +0200
summary:     False friend fix
files:       src/distutils2/tests/test_config.py, src/distutils2/tests/test_upload.py

diff --git a/src/distutils2/tests/test_config.py b/src/distutils2/tests/test_config.py
--- a/src/distutils2/tests/test_config.py
+++ b/src/distutils2/tests/test_config.py
@@ -86,20 +86,20 @@
 
         config = config.items()
         config.sort()
-        waited = [('password', 'secret'), ('realm', 'pypi'),
-                  ('repository', 'http://pypi.python.org/pypi'),
-                  ('server', 'server1'), ('username', 'me')]
-        self.assertEquals(config, waited)
+        expected = [('password', 'secret'), ('realm', 'pypi'),
+                    ('repository', 'http://pypi.python.org/pypi'),
+                    ('server', 'server1'), ('username', 'me')]
+        self.assertEquals(config, expected)
 
         # old format
         self.write_file(self.rc, PYPIRC_OLD)
         config = cmd._read_pypirc()
         config = config.items()
         config.sort()
-        waited = [('password', 'secret'), ('realm', 'pypi'),
-                  ('repository', 'http://pypi.python.org/pypi'),
-                  ('server', 'server-login'), ('username', 'tarek')]
-        self.assertEquals(config, waited)
+        expected = [('password', 'secret'), ('realm', 'pypi'),
+                    ('repository', 'http://pypi.python.org/pypi'),
+                    ('server', 'server-login'), ('username', 'tarek')]
+        self.assertEquals(config, expected)
 
     def test_server_empty_registration(self):
         cmd = self._cmd(self.dist)
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
@@ -77,10 +77,10 @@
         dist = Distribution()
         cmd = upload(dist)
         cmd.finalize_options()
-        for attr, waited in (('username', 'me'), ('password', 'secret'),
-                             ('realm', 'pypi'),
-                             ('repository', 'http://pypi.python.org/pypi')):
-            self.assertEquals(getattr(cmd, attr), waited)
+        for attr, expected in (('username', 'me'), ('password', 'secret'),
+                               ('realm', 'pypi'),
+                               ('repository', 'http://pypi.python.org/pypi')):
+            self.assertEquals(getattr(cmd, attr), expected)
 
     def test_saved_password(self):
         # file with no password

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list