We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c2bb04 commit 12aff1aCopy full SHA for 12aff1a
1 file changed
Lib/test/test_subprocess.py
@@ -2449,6 +2449,16 @@ def test_CalledProcessError_str_non_zero(self):
2449
error_string = str(err)
2450
self.assertIn("non-zero exit status 2.", error_string)
2451
2452
+ def test_CalledProcessError_str_quote_in_cmd(self):
2453
+ err = subprocess.CalledProcessError(2, "fake ' cmd")
2454
+ error_string = str(err)
2455
+ self.assertStartsWith(error_string, 'Command "fake \' cmd" ')
2456
+
2457
+ def test_CalledProcessError_str_list_cmd(self):
2458
+ err = subprocess.CalledProcessError(2, ["fake", "cmd"])
2459
2460
+ self.assertStartsWith(error_string, "Command ['fake', 'cmd'] ")
2461
2462
def test_preexec(self):
2463
# DISCLAIMER: Setting environment variables is *not* a good use
2464
# of a preexec_fn. This is merely a test.
0 commit comments