[Python-checkins] distutils2: Tighten tests for #13399

eric.araujo python-checkins at python.org
Mon May 21 21:56:02 CEST 2012


http://hg.python.org/distutils2/rev/7d4098ce0087
changeset:   1343:7d4098ce0087
user:        Éric Araujo <merwok at netwok.org>
date:        Sun May 20 00:53:08 2012 -0400
summary:
  Tighten tests for #13399

files:
  distutils2/tests/test_run.py |  16 ++++++++--------
  1 files changed, 8 insertions(+), 8 deletions(-)


diff --git a/distutils2/tests/test_run.py b/distutils2/tests/test_run.py
--- a/distutils2/tests/test_run.py
+++ b/distutils2/tests/test_run.py
@@ -106,26 +106,26 @@
         # sadly this message comes straight from the getopt module and can't be
         # modified to use repr instead of str for the unknown option; to be
         # changed when the command line parsers are replaced by something clean
-        self.assertEqual(err.splitlines()[-1],
-                         'error: option --unknown not recognized')
+        self.assertEqual(err.splitlines(),
+                         ['error: option --unknown not recognized'])
 
     def test_invalid_command(self):
         out, err = self.call_pysetup_fail('run', 'com#mand')
         self.assertGreater(out, 1)
-        self.assertEqual(err.splitlines()[-1],
-                         "error: invalid command name 'com#mand'")
+        self.assertEqual(err.splitlines(),
+                         ["error: invalid command name 'com#mand'"])
 
     def test_unknown_command(self):
         out, err = self.call_pysetup_fail('run', 'invalid_command')
         self.assertGreater(out, 1)
-        self.assertEqual(err.splitlines()[-1],
-                         "error: command 'invalid_command' not recognized")
+        self.assertEqual(err.splitlines(),
+                         ["error: command 'invalid_command' not recognized"])
 
     def test_unknown_action(self):
         out, err = self.call_pysetup_fail('invalid_action')
         self.assertGreater(out, 1)
-        self.assertEqual(err.splitlines()[-1],
-                         "error: action 'invalid_action' not recognized")
+        self.assertEqual(err.splitlines(),
+                         ["error: action 'invalid_action' not recognized"])
 
 
 def test_suite():

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


More information about the Python-checkins mailing list