Example #1
0
 def setUpClass(cls):
     cls.test_ipython_dir = tempfile.mkdtemp()
     os.environ["IPYTHONDIR"] = cls.test_ipython_dir
     cls.widget = QtSpockWidget(use_model_from_profile=True)
     cls.widget.start_kernel()
     cls.widget.show()
     cls._isDestroyed = False
Example #2
0
 def setUpClass(cls):
     cls.test_ipython_dir = tempfile.mkdtemp()
     os.environ["IPYTHONDIR"] = cls.test_ipython_dir
     cls.widget = QtSpockWidget()
     cls.widget.setModel(UNITTEST_DOOR_NAME)
     cls.widget.show()
     cls._isDestroyed = False
Example #3
0
    def setUpClass(cls):
        super(QtSpockModelAfterRestartTestCase, cls).setUpClass()
        cls.widget = QtSpockWidget()
        cls.widget.start_kernel()
        cls.widget.show()

        # Wait until startup finished
        def predicate():
            text = cls.widget._control.toPlainText()
            matches = re.findall(r"\[1\]: $", text, re.MULTILINE)
            return len(matches) == 1
        assert waitFor(predicate, 10000)

        cls.widget.setModel(UNITTEST_DOOR_NAME)
Example #4
0
    def setUpClass(cls):
        # Do only call the original base class constructor
        super(QtSpockNoModelTestCase, cls).setUpClass()
        cls.widget = QtSpockWidget()
        cls.widget.setModel(UNITTEST_DOOR_NAME)
        cls.widget.show()

        # Wait until startup finished
        def predicate():
            text = cls.widget._control.toPlainText()
            matches = re.findall(r"\[1\]: $", text, re.MULTILINE)
            return len(matches) == 1
        assert waitFor(predicate, 10000)

        cls.widget.setModel("")
Example #5
0
 def setUpClass(cls):
     super(QtSpockModelTestCase, cls).setUpClass()
     cls.widget = QtSpockWidget()
     cls.widget.setModel(UNITTEST_DOOR_NAME)
     cls.widget.show()
Example #6
0
 def setUpClass(cls):
     super(QtSpockNoModelTestCase, cls).setUpClass()
     cls.widget = QtSpockWidget()
     cls.widget.start_kernel()
     cls.widget.show()
Example #7
0
 def setUpClass(cls):
     super(QtSpockTestCase, cls).setUpClass()
     cls.widget = QtSpockWidget(use_model_from_profile=True)
     cls.widget.start_kernel()
     cls.widget.show()