[Python-checkins] r67950 - in python/branches/py3k/Lib/distutils: command/register.py tests/test_register.py

benjamin.peterson python-checkins at python.org
Sat Dec 27 18:00:44 CET 2008


Author: benjamin.peterson
Date: Sat Dec 27 18:00:44 2008
New Revision: 67950

Log:
fix 2.x isms in distutils test

Modified:
   python/branches/py3k/Lib/distutils/command/register.py
   python/branches/py3k/Lib/distutils/tests/test_register.py

Modified: python/branches/py3k/Lib/distutils/command/register.py
==============================================================================
--- python/branches/py3k/Lib/distutils/command/register.py	(original)
+++ python/branches/py3k/Lib/distutils/command/register.py	Sat Dec 27 18:00:44 2008
@@ -150,7 +150,7 @@
  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:

Modified: python/branches/py3k/Lib/distutils/tests/test_register.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_register.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_register.py	Sat Dec 27 18:00:44 2008
@@ -60,7 +60,7 @@
         # 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 @@
             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'
 


More information about the Python-checkins mailing list