Skip to content

Remove test dependency on sumtypes library #1798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix annotations for Python 3.8 and lower
  • Loading branch information
EliahKagan committed Jan 11, 2024
commit 70ea7ec475a82b2483cf151abb9e542f5085af4c
8 changes: 4 additions & 4 deletions test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import re
import shutil
from stat import S_ISLNK, ST_MODE
from subprocess import CompletedProcess, run
import subprocess
import tempfile

import ddt
Expand Down Expand Up @@ -93,14 +93,14 @@ class Wsl:
class WslNoDistro:
"""Running bash.exe tries to run bash on a WSL distribution, but none exists."""

process: CompletedProcess[bytes]
process: "subprocess.CompletedProcess[bytes]"
message: str

@dataclass
class CheckError:
"""Running bash.exe fails in an unexpected error or gives unexpected output."""

process: CompletedProcess[bytes]
process: "subprocess.CompletedProcess[bytes]"
message: str

@dataclass
Expand Down Expand Up @@ -133,7 +133,7 @@ def check(cls):
# information on ways to check for WSL, see https://superuser.com/a/1749811.
script = 'test -e /proc/sys/fs/binfmt_misc/WSLInterop; echo "$?"'
command = ["bash.exe", "-c", script]
process = run(command, capture_output=True)
process = subprocess.run(command, capture_output=True)
except FileNotFoundError:
return cls.Absent()
except OSError as error:
Expand Down