Skip to content
Snippets Groups Projects
Commit c5560f13 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests/launcher: Fix mypy warnings

parent 8fc7754f
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,9 @@ class TestLauncher(BaseTest): ...@@ -58,7 +58,9 @@ class TestLauncher(BaseTest):
def test_socket_directory(self) -> None: def test_socket_directory(self) -> None:
with tempfile.TemporaryDirectory(prefix='test-') as temp: with tempfile.TemporaryDirectory(prefix='test-') as temp:
printf_symlink = os.path.join(temp, 'printf=symlink') printf_symlink = os.path.join(temp, 'printf=symlink')
os.symlink(shutil.which('printf'), printf_symlink) printf = shutil.which('printf')
assert printf is not None
os.symlink(printf, printf_symlink)
proc = subprocess.Popen( proc = subprocess.Popen(
[ [
...@@ -561,10 +563,12 @@ class TestLauncher(BaseTest): ...@@ -561,10 +563,12 @@ class TestLauncher(BaseTest):
stderr=2, stderr=2,
universal_newlines=True, universal_newlines=True,
) )
stdin = proc.stdin
assert stdin is not None
os.close(read_end) os.close(read_end)
if use_stdin: if use_stdin:
proc.stdin.close() stdin.close()
else: else:
os.close(write_end) os.close(write_end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment