Fix pre-commit
This commit is contained in:
parent
638e8495c9
commit
ba46e1be81
3 changed files with 10 additions and 8 deletions
2
setup.py
2
setup.py
|
@ -1,5 +1,3 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import os.path
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
Since all signals are printed and otherwise ignored, you'll need to send
|
||||
SIGKILL (kill -9) to this process to actually end it.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import os
|
||||
import shutil
|
||||
from subprocess import run, PIPE
|
||||
from subprocess import PIPE
|
||||
from subprocess import run
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('both_debug_modes', 'both_setsid_modes')
|
||||
def test_working_directories():
|
||||
"""The child process must start in the working directory in which
|
||||
|
@ -14,9 +16,13 @@ def test_working_directories():
|
|||
# predictable output - so we can't rely on dumb-init being found
|
||||
# in the "." directory.
|
||||
dumb_init = os.path.realpath(shutil.which('dumb-init'))
|
||||
proc = run((dumb_init,
|
||||
'sh', '-c', 'readlink /proc/$PPID/cwd && readlink /proc/$$/cwd'),
|
||||
cwd="/tmp", stdout=PIPE, stderr=PIPE)
|
||||
proc = run(
|
||||
(
|
||||
dumb_init,
|
||||
'sh', '-c', 'readlink /proc/$PPID/cwd && readlink /proc/$$/cwd',
|
||||
),
|
||||
cwd='/tmp', stdout=PIPE, stderr=PIPE,
|
||||
)
|
||||
|
||||
assert proc.returncode == 0
|
||||
assert proc.stdout == b'/\n/tmp\n'
|
||||
|
|
Loading…
Reference in a new issue