# HG changeset patch # User Windel Bouwman # Date 1394293611 -3600 # Node ID 62803b073d11450c48eecf3246e05dcba73a7f30 # Parent 2b02bd286fe9e46151db3d7a415a939bd9e3c769 Add conditional qt5 test diff -r 2b02bd286fe9 -r 62803b073d11 test/testhexedit.py --- a/test/testhexedit.py Sat Mar 08 16:29:03 2014 +0100 +++ b/test/testhexedit.py Sat Mar 08 16:46:51 2014 +0100 @@ -1,16 +1,23 @@ import sys import unittest -import hexedit -#import ide +try: + import hexedit + #import ide -from PyQt5.QtWidgets import QApplication -from PyQt5.QtTest import QTest -from PyQt5.QtCore import Qt + from PyQt5.QtWidgets import QApplication + from PyQt5.QtTest import QTest + from PyQt5.QtCore import Qt + skip_it = False +except ImportError as e: + skip_it = True class HexEditorTest(unittest.TestCase): def setUp(self): + if skip_it: + self.skipTest('No qt5') + return self.app = QApplication(sys.argv) self.ui = hexedit.HexEditor() self.bv = self.ui.he.bv