aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-07-18 16:32:36 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-07-18 21:58:58 -0400
commit6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d (patch)
treecce762223c60c98325469573c1642f5b6709d177
parent46586c79a482a7234f90081d6df9e909a5f93792 (diff)
downloadmeson-6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d.zip
meson-6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d.tar.gz
meson-6894bb5a30a05dbd9d30eb4ce5720f6c2a7df83d.tar.bz2
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.
-rw-r--r--mesonbuild/mtest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index eb56c42..88995c0 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 []