virt-manager/tests/uitests/__init__.py
Daniel P. Berrangé 48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00

42 lines
1.2 KiB
Python

# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
import os
import signal
import sys
import warnings
# Dogtail is noisy with GTK and GI deprecation warnings
warnings.simplefilter("ignore")
# Ignores pylint error since dogtail doesn't specify this
import gi
gi.require_version('Atspi', '2.0')
import dogtail.config
from tests.uitests import utils
# Perform 5 search attempts if a widget lookup fails (default 20)
dogtail.config.config.searchCutoffCount = 5
# Use .1 second delay between each action (default 1)
dogtail.config.config.actionDelay = .1
# Turn off needlessly noisy debugging
DOGTAIL_DEBUG = False
dogtail.config.config.logDebugToStdOut = DOGTAIL_DEBUG
dogtail.config.config.logDebugToFile = False
# Dogtail screws with the default excepthook, disabling output if we turned
# off logging, so fix it
sys.excepthook = sys.__excepthook__
# 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))
# Needed so labels are matched in english
os.environ['LANG'] = 'en_US.UTF-8'