Skip to content

Commit a83609e

Browse files
committed
fixup! fixup! Add option to override command line
1 parent 86ca6de commit a83609e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

test/test_plugin.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,23 @@ def test_apply_overrides():
138138

139139
def test_option_overrides(tmpdir, diag_mp, workspace):
140140
import sys
141+
from textwrap import dedent
142+
from stat import S_IRWXU
141143

142144
sentinel = tmpdir / "ran"
143145

144-
source = """\
145-
#!{}
146-
import os, sys, pathlib
147-
pathlib.Path({!r}).touch()
148-
os.execv({!r}, sys.argv)\n"""
149-
150-
source = source.format(sys.executable, str(sentinel), sys.executable)
146+
source = dedent(
147+
"""\
148+
#!{}
149+
import os, sys, pathlib
150+
pathlib.Path({!r}).touch()
151+
os.execv({!r}, sys.argv)
152+
"""
153+
).format(sys.executable, str(sentinel), sys.executable)
151154

152155
wrapper = tmpdir / "bin/wrapper"
153156
wrapper.write(source, ensure=True)
154-
wrapper.chmod(0o700)
157+
wrapper.chmod(S_IRWXU)
155158

156159
overrides = ["--python-executable", wrapper.strpath, True]
157160
diag_mp.setattr(

0 commit comments

Comments
 (0)