]> granicus.if.org Git - python/commitdiff
fix 2.x isms in distutils test
authorBenjamin Peterson <benjamin@python.org>
Sat, 27 Dec 2008 17:00:44 +0000 (17:00 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 27 Dec 2008 17:00:44 +0000 (17:00 +0000)
Lib/distutils/command/register.py
Lib/distutils/tests/test_register.py

index bd9b8c0143fb518c1c6ba9897c80001103ed6527..30e9a37e6ad800f06d144dd29515b14b910facde 100644 (file)
@@ -150,7 +150,7 @@ We need to know who you are, so please choose either:
  3. have the server generate a new password for you (and email it to you), or
  4. quit
 Your selection [default 1]: ''', log.INFO)
-            choice = raw_input()
+            choice = input()
             if not choice:
                 choice = '1'
             elif choice not in choices:
index 3a3a3b739b94602c08f2183c51a1f0952e32a8c9..021b3ea884c7bbf15984ce59d2533553fb7bb602 100644 (file)
@@ -60,7 +60,7 @@ class registerTestCase(PyPIRCCommandTestCase):
         # Save your login (y/N)? : 'y'
         inputs = RawInputs('1', 'tarek', 'y')
         from distutils.command import register as register_module
-        register_module.raw_input = inputs.__call__
+        register_module.input = inputs.__call__
         def _getpass(prompt):
             return 'xxx'
         register_module.getpass.getpass = _getpass
@@ -71,8 +71,7 @@ class registerTestCase(PyPIRCCommandTestCase):
             def __call__(self, *args):
                 # we want to compare them, so let's store
                 # something comparable
-                els = args[0].items()
-                els.sort()
+                els = sorted(args[0].items())
                 self.calls.append(tuple(els))
                 return 200, 'OK'