File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -138,20 +138,23 @@ def test_apply_overrides():
138138
139139def 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 (
You can’t perform that action at this time.
0 commit comments