summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-08-30 17:15:14 (GMT)
committerThomas Heller <theller@ctypes.org>2007-08-30 17:15:14 (GMT)
commit6790d606ffb44b24129552fca5418c0d408aac05 (patch)
tree331d90466a778e38e21a1aa50efd603a76e4fbeb /Lib/test/test_os.py
parent8a7c866e18d12c9a666b556153555dc98c3f3f68 (diff)
downloadcpython-6790d606ffb44b24129552fca5418c0d408aac05.zip
cpython-6790d606ffb44b24129552fca5418c0d408aac05.tar.gz
cpython-6790d606ffb44b24129552fca5418c0d408aac05.tar.bz2
Forbid an empty argument list in execv call.
Fixes issue 1039.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index a5f5de3..085e6fa 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -441,6 +441,9 @@ class ExecTests(unittest.TestCase):
def test_execvpe_with_bad_program(self):
self.assertRaises(OSError, os.execvpe, 'no such app-', [], None)
+ def test_execvpe_with_bad_arglist(self):
+ self.assertRaises(ValueError, os.execvpe, 'notepad', [], None)
+
class Win32ErrorTests(unittest.TestCase):
def test_rename(self):
self.assertRaises(WindowsError, os.rename, test_support.TESTFN, test_support.TESTFN+".bak")