MCPcopy Index your code
hub / github.com/python/cpython / quote_args

Method quote_args

Lib/test/test_os/test_os.py:3275–3280  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

3273class SpawnTests(unittest.TestCase):
3274 @staticmethod
3275 def quote_args(args):
3276 # On Windows, os.spawn* simply joins arguments with spaces:
3277 # arguments need to be quoted
3278 if os.name != 'nt':
3279 return args
3280 return [f'"{arg}"' if " " in arg.strip() else arg for arg in args]
3281
3282 def create_args(self, *, with_env=False, use_bytes=False):
3283 self.exitcode = 17

Callers 2

create_argsMethod · 0.95
_test_invalid_envMethod · 0.95

Calls 1

stripMethod · 0.45

Tested by

no test coverage detected