From 6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 18 Jul 2023 16:32:36 -0400 Subject: 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. --- mesonbuild/mtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index eb56c42be..88995c0fe 100644 --- a/mesonbuild/mtest.py +++ b/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 [] -- cgit v1.2.3