Forbid an empty argument list in execv call.
Fixes issue 1039.
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 @@
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")