aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2022-02-01 00:00:00 +0200
committerEli Schwartz <eschwartz93@gmail.com>2022-06-09 18:58:33 -0400
commit478ac7f6cc24b686922add6383cb3ddf39d83d33 (patch)
tree9c27af83165197a3d1abc422dd2f896c5db5ee97
parentb69d4f38e6f4488da42402a19b921a9012692ffe (diff)
downloadmeson-478ac7f6cc24b686922add6383cb3ddf39d83d33.zip
meson-478ac7f6cc24b686922add6383cb3ddf39d83d33.tar.gz
meson-478ac7f6cc24b686922add6383cb3ddf39d83d33.tar.bz2
mtest: fix a couple of minor whitespace / typing issues
-rw-r--r--mesonbuild/mtest.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 5c4d7bc..9096508 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -233,7 +233,7 @@ class TestResult(enum.Enum):
@staticmethod
def maxlen() -> int:
- return 14 # len(UNEXPECTEDPASS)
+ return 14 # len(UNEXPECTEDPASS)
def is_ok(self) -> bool:
return self in {TestResult.OK, TestResult.EXPECTEDFAIL}
@@ -267,7 +267,11 @@ class TestResult(enum.Enum):
return str(self.colorize('>>> '))
-TYPE_TAPResult = T.Union['TAPParser.Test', 'TAPParser.Error', 'TAPParser.Version', 'TAPParser.Plan', 'TAPParser.Bailout']
+TYPE_TAPResult = T.Union['TAPParser.Test',
+ 'TAPParser.Error',
+ 'TAPParser.Version',
+ 'TAPParser.Plan',
+ 'TAPParser.Bailout']
class TAPParser:
class Plan(T.NamedTuple):
@@ -1396,7 +1400,7 @@ class SingleTestRunner:
return self.runobj
async def _run_subprocess(self, args: T.List[str], *,
- stdout: int, stderr: int,
+ stdout: T.Optional[int], stderr: T.Optional[int],
env: T.Dict[str, str], cwd: T.Optional[str]) -> TestSubprocess:
# Let gdb handle ^C instead of us
if self.options.gdb:
@@ -1840,9 +1844,9 @@ class TestHarness:
async def _run_tests(self, runners: T.List[SingleTestRunner]) -> None:
semaphore = asyncio.Semaphore(self.options.num_processes)
futures = deque() # type: T.Deque[asyncio.Future]
- running_tests = dict() # type: T.Dict[asyncio.Future, str]
+ running_tests = dict() # type: T.Dict[asyncio.Future, str]
interrupted = False
- ctrlc_times = deque(maxlen=MAX_CTRLC) # type: T.Deque[float]
+ ctrlc_times = deque(maxlen=MAX_CTRLC) # type: T.Deque[float]
async def run_test(test: SingleTestRunner) -> None:
async with semaphore: