]> granicus.if.org Git - python/commitdiff
Fix unit test failure -- the output received from Python can be empty,
authorGuido van Rossum <guido@python.org>
Sat, 8 Oct 2005 20:04:35 +0000 (20:04 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 8 Oct 2005 20:04:35 +0000 (20:04 +0000)
but verify_valid_flag() wasn't expecting that.  Will backport.

Lib/test/test_cmd_line.py

index fc0c2d2c31b84852fbdb37edee3e03a22dfcedfa..a4a78f59763dd56d29e1f9898037684ee661a2e8 100644 (file)
@@ -17,7 +17,7 @@ class CmdLineTest(unittest.TestCase):
 
     def verify_valid_flag(self, cmd_line):
         data = self.start_python(cmd_line)
-        self.assertTrue(data.endswith('\n'))
+        self.assertTrue(data == '' or data.endswith('\n'))
         self.assertTrue('Traceback' not in data)
 
     def test_environment(self):