2018-04-04 16:35:41 +03:00
# This work is licensed under the GNU GPLv2 or later.
2018-03-20 22:00:02 +03:00
# See the COPYING file in the top-level directory.
2015-09-07 01:37:49 +03:00
import os
2018-01-08 16:44:54 +03:00
import signal
2015-09-07 01:37:49 +03:00
import sys
import warnings
# Dogtail is noisy with GTK and GI deprecation warnings
warnings . simplefilter ( " ignore " )
2015-12-04 19:49:14 +03:00
# Ignores pylint error since dogtail doesn't specify this
import gi
gi . require_version ( ' Atspi ' , ' 2.0 ' )
2015-09-07 01:37:49 +03:00
import dogtail . config
2015-09-09 16:49:45 +03:00
from tests . uitests import utils
2015-09-07 01:37:49 +03:00
# Perform 5 search attempts if a widget lookup fails (default 20)
dogtail . config . config . searchCutoffCount = 5
2018-01-11 02:57:40 +03:00
# Use .1 second delay between each action (default 1)
2015-09-09 16:49:45 +03:00
dogtail . config . config . actionDelay = .1
2015-09-07 01:37:49 +03:00
# Turn off needlessly noisy debugging
DOGTAIL_DEBUG = False
dogtail . config . config . logDebugToStdOut = DOGTAIL_DEBUG
2015-09-12 21:25:05 +03:00
dogtail . config . config . logDebugToFile = False
2015-09-07 01:37:49 +03:00
# Dogtail screws with the default excepthook, disabling output if we turned
# off logging, so fix it
sys . excepthook = sys . __excepthook__
2018-01-08 16:44:54 +03:00
# dogtail.utils.Blinker creates a GLib.MainLoop on module import, which
# screws up SIGINT handling somehow. This reregisters the
# unittest.installHandler magic
signal . signal ( signal . SIGINT , signal . getsignal ( signal . SIGINT ) )
2015-09-07 01:37:49 +03:00
# Needed so labels are matched in english
os . environ [ ' LANG ' ] = ' en_US.UTF-8 '
2019-06-09 21:26:03 +03:00
os . environ . pop ( " VIRTINST_TEST_SUITE " , None )