From ba46e1be8137cba10b3cfe62e7002e1b3dfbf599 Mon Sep 17 00:00:00 2001 From: Chris Kuehl Date: Thu, 7 Oct 2021 11:21:16 -0700 Subject: [PATCH] Fix pre-commit --- setup.py | 2 -- testing/print_signals.py | 2 -- tests/cwd_test.py | 14 ++++++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 0ec2f18..0cb322d 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import os.path import subprocess import tempfile diff --git a/testing/print_signals.py b/testing/print_signals.py index 4cc26b9..9fd7994 100755 --- a/testing/print_signals.py +++ b/testing/print_signals.py @@ -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 diff --git a/tests/cwd_test.py b/tests/cwd_test.py index ff4ff80..d606bc8 100644 --- a/tests/cwd_test.py +++ b/tests/cwd_test.py @@ -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'