mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gio: use TAPTestRunner in the memory monitor tests
There are two memory monitor tests that use Python's unittest module directly, but GLib tests should be outputting TAP. Use the embedded TAPTestRunner to ensure that TAP is output for these tests too.
This commit is contained in:
parent
1a3a1865eb
commit
1fcd32a159
@ -21,6 +21,8 @@ import fcntl
|
||||
import os
|
||||
import time
|
||||
|
||||
import taptestrunner
|
||||
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gio
|
||||
|
||||
@ -98,5 +100,4 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# avoid writing to stderr
|
||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
||||
unittest.main(testRunner=taptestrunner.TAPTestRunner())
|
||||
|
@ -21,6 +21,8 @@ import fcntl
|
||||
import os
|
||||
import time
|
||||
|
||||
import taptestrunner
|
||||
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gio
|
||||
|
||||
@ -114,5 +116,4 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# avoid writing to stderr
|
||||
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
|
||||
unittest.main(testRunner=taptestrunner.TAPTestRunner())
|
||||
|
@ -531,8 +531,9 @@ if installed_tests_enabled
|
||||
cdata = configuration_data()
|
||||
cdata.set('installed_tests_dir', installed_tests_execdir)
|
||||
cdata.set('program', memory_monitor_test + '.py')
|
||||
cdata.set('env', '')
|
||||
configure_file(
|
||||
input: installed_tests_template,
|
||||
input: installed_tests_template_tap,
|
||||
output: memory_monitor_test + '.test',
|
||||
install_dir: installed_tests_metadir,
|
||||
configuration: cdata
|
||||
|
Loading…
Reference in New Issue
Block a user