aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2022-02-01 00:00:00 +0200
committerHemmo Nieminen <hemmo.nieminen@iki.fi>2022-03-23 00:00:00 +0200
commit2da4789e1bb1bea1b165bca9868d0415a840c24f (patch)
tree86a66caece51d1e6af9a4bc67da06d15289c318a
parent8867fb7999e35c6713c46af64becfd1a08146a6a (diff)
downloadmeson-2da4789e1bb1bea1b165bca9868d0415a840c24f.zip
meson-2da4789e1bb1bea1b165bca9868d0415a840c24f.tar.gz
meson-2da4789e1bb1bea1b165bca9868d0415a840c24f.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 b474cd4..2972741 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):
@@ -1401,7 +1405,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:
@@ -1845,9 +1849,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: