MCPcopy Index your code
hub / github.com/RustPython/RustPython / quote_args

Method quote_args

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

Source from the content-addressed store, hash-verified

3588class SpawnTests(unittest.TestCase):
3589 @staticmethod
3590 def quote_args(args):
3591 # On Windows, os.spawn* simply joins arguments with spaces:
3592 # arguments need to be quoted
3593 if os.name != 'nt':
3594 return args
3595 return [f'"{arg}"' if " " in arg.strip() else arg for arg in args]
3596
3597 def create_args(self, *, with_env=False, use_bytes=False):
3598 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