diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-06-24 22:45:04 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-06-25 16:27:34 -0300 |
commit | 77d9434c4a92528e13b008a50dfbcb5f2f1456a4 (patch) | |
tree | 607027375791754a79b99838de5ace879ae6cd21 | |
parent | 900543f380ec6e002023be4d5210e0d93c74ee70 (diff) |
pep8 fixes
-rw-r--r-- | src/leap/util/keyring_helpers.py | 1 | ||||
-rw-r--r-- | src/leap/util/pyside_tests_helper.py | 7 |
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 |