diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-09 05:58:11 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-09 05:58:11 (GMT) |
commit | 72c2c062d71c499863ff6e260525faaea4a53dbb (patch) | |
tree | a93e5551c95aff7b117588fa91465a9b15558d45 /Lib/test | |
parent | 8ff212034e3386916f1a35ff3b0c955aa1ea2b4a (diff) | |
download | cpython-72c2c062d71c499863ff6e260525faaea4a53dbb.zip cpython-72c2c062d71c499863ff6e260525faaea4a53dbb.tar.gz cpython-72c2c062d71c499863ff6e260525faaea4a53dbb.tar.bz2 |
Try to be a bit more consistent on all platforms:
python .
python < .
both print a message, return non-zero and do not core dump.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_cmd_line.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 2d293c9..a4a656d 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -16,19 +16,8 @@ class CmdLineTest(unittest.TestCase): return subprocess.call([sys.executable, cmd_line], stderr=subprocess.PIPE) def test_directories(self): - if sys.platform == 'win32': - # Exit code for "python .", Error 13: permission denied = 2 - expected_exit_code = 2 - elif sys.platform.startswith('freebsd'): - # On FreeBSD, it more likely raise SyntaxError for binary - # directory data. - expected_exit_code = 1 - else: - # Linux has no problem with "python .", Exit code = 0 - expected_exit_code = 0 - self.assertEqual(self.exit_code('.'), expected_exit_code) - - self.assertTrue(self.exit_code('< .') != 0) + self.assertNotEqual(self.exit_code('.'), 0) + self.assertNotEqual(self.exit_code('< .'), 0) def verify_valid_flag(self, cmd_line): data = self.start_python(cmd_line) |