]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Stop using TextTestRunner in systemd-networkd-tests.py
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 15 Feb 2022 11:50:31 +0000 (11:50 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 15 Feb 2022 14:32:06 +0000 (23:32 +0900)
If we assign our own test runner, passing arguments stops working
as unittest won't instantiate its own test runner after it parses
the arguments from sys.argv.

Consequence is that the tests will write to stderr now instead of
stdout since it doesn't seem possible to configure the stream that
unittest.main() will instantiate its test runner with so it'll
default to sys.stderr.

test/test-network/systemd-networkd-tests.py

index 6fc8398e0f6131e1ff7ce7f375fd24af3cbfec1a..a778652a8eab5b4d4753ca706f141730f9ec12aa 100755 (executable)
@@ -5933,5 +5933,4 @@ if __name__ == '__main__':
         env.update({ 'UBSAN_OPTIONS' : ubsan_options })
 
     sys.argv[1:] = unknown_args
-    unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout,
-                                                     verbosity=3))
+    unittest.main(verbosity=3)