summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/util/keyring_helpers.py1
-rw-r--r--src/leap/util/pyside_tests_helper.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/src/leap/util/keyring_helpers.py b/src/leap/util/keyring_helpers.py
index b3dd0175..b815d385 100644
--- a/src/leap/util/keyring_helpers.py
+++ b/src/leap/util/keyring_helpers.py
@@ -26,6 +26,7 @@ OBSOLETE_KEYRINGS = [
keyring.backends.file.PlaintextKeyring
]
+
def has_keyring():
"""
diff --git a/src/leap/util/pyside_tests_helper.py b/src/leap/util/pyside_tests_helper.py
index a010934a..5c0eb8d6 100644
--- a/src/leap/util/pyside_tests_helper.py
+++ b/src/leap/util/pyside_tests_helper.py
@@ -15,14 +15,17 @@ except ImportError:
else:
has_gui = True
+
def adjust_filename(filename, orig_mod_filename):
dirpath = os.path.dirname(os.path.abspath(orig_mod_filename))
return os.path.join(dirpath, filename)
+
class NoQtGuiError(Exception):
def __init__(self):
Exception.__init__(self, 'No QtGui found')
+
class BasicPySlotCase(object):
'''Base class that tests python slots and signal emissions.
@@ -75,7 +78,6 @@ if has_gui:
del self.app
super(UsesQApplication, self).tearDown()
-
class TimedQApplication(unittest.TestCase):
'''Helper class with timed QApplication exec loop'''
@@ -97,13 +99,14 @@ else:
class UsesQApplication(unittest.TestCase):
def setUp(self):
raise NoQtGuiError()
+
class TimedQapplication(unittest.TestCase):
def setUp(self):
raise NoQtGuiError()
-
_core_instance = None
+
class UsesQCoreApplication(unittest.TestCase):
'''Helper class for test cases that require an QCoreApplication
Just connect or call self.exit_app_cb. When called, will ask