sys.argv not inline
This commit is contained in:
parent
a7398e13f7
commit
ca522a5293
|
@ -642,14 +642,14 @@ class PidFileLocking(SyncTestCase):
|
||||||
f.write(
|
f.write(
|
||||||
"\n".join([
|
"\n".join([
|
||||||
"import filelock, time, sys",
|
"import filelock, time, sys",
|
||||||
"with filelock.FileLock(r'{}', timeout=1):".format(lockfile.path),
|
"with filelock.FileLock(sys.argv[1], timeout=1):",
|
||||||
" sys.stdout.write('.\\n')",
|
" sys.stdout.write('.\\n')",
|
||||||
" sys.stdout.flush()",
|
" sys.stdout.flush()",
|
||||||
" time.sleep(10)",
|
" time.sleep(10)",
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
proc = Popen(
|
proc = Popen(
|
||||||
[sys.executable, "other_lock.py"],
|
[sys.executable, "other_lock.py", lockfile.path],
|
||||||
stdout=PIPE,
|
stdout=PIPE,
|
||||||
stderr=PIPE,
|
stderr=PIPE,
|
||||||
start_new_session=True,
|
start_new_session=True,
|
||||||
|
|
Loading…
Reference in New Issue