Skip to content

Commit 5450159

Browse files
jb2170johnslavik
andauthored
shlex.quote tests: Remove comments
The comments for why these tests exist can always be found in the git history Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
1 parent f470aa1 commit 5450159

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

Lib/test/test_shlex.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -345,24 +345,11 @@ def testQuote(self):
345345

346346
def testForceQuote(self):
347347
# ensure default `force` behavior does not unnecessarily quote strings
348-
self.assertEqual(shlex.quote("no-quotes-needed"),
349-
"no-quotes-needed")
350-
351-
# ensure `force=False` does not unnecessarily quote strings
352-
self.assertEqual(shlex.quote("no-quotes-needed", force=False),
353-
"no-quotes-needed")
354-
355-
# ensure `force=True` does quote strings that
356-
# would not be quoted if using `force=False`
357-
self.assertEqual(shlex.quote("no-quotes-needed", force=True),
358-
"'no-quotes-needed'")
359-
360-
# ensure `force` does not affect outcome for strings that
361-
# need quoting anyways
362-
self.assertEqual(shlex.quote("quotes needed", force=False),
363-
"'quotes needed'")
364-
self.assertEqual(shlex.quote("quotes needed", force=True),
365-
"'quotes needed'")
348+
self.assertEqual(shlex.quote("spam"), "spam")
349+
self.assertEqual(shlex.quote("spam", force=False), "spam")
350+
self.assertEqual(shlex.quote("spam", force=True), "'spam'")
351+
self.assertEqual(shlex.quote("spam eggs", force=False), "'spam eggs'")
352+
self.assertEqual(shlex.quote("spam eggs", force=True), "'spam eggs'")
366353

367354
def testJoin(self):
368355
for split_command, command in [

0 commit comments

Comments
 (0)