mtest: avoid meddling with stdout by default

The original point of specifying Optional was to default to None...
oops. The practical effect of this change is that the testsuite no
longer repeatedly logs "No tests defined." in between more meaningful
output.
pull/12014/head
Eli Schwartz 1 year ago committed by Xavier Claessens
parent 46586c79a4
commit 6894bb5a30
  1. 2
      mesonbuild/mtest.py

@ -1933,7 +1933,7 @@ class TestHarness:
# succeed on an invalid pattern.
raise MesonException(f'{arg} test name does not match any test')
def get_tests(self, errorfile: T.Optional[T.IO] = sys.stdout) -> T.List[TestSerialisation]:
def get_tests(self, errorfile: T.Optional[T.IO] = None) -> T.List[TestSerialisation]:
if not self.tests:
print('No tests defined.', file=errorfile)
return []

Loading…
Cancel
Save