Example #1
0
 def sleep(self):
     """
     Wait for the splash screen to be drawn for at least 'mtime' seconds.
     """
     now = time()
     if now < self.mtime:
         for _ in rangeF(start=0, stop=self.mtime - now, step=0.01):
             QtWidgets.QApplication.processEvents()
             sleep(0.01)
Example #2
0
 def sleep(self):
     """
     Wait for the splash screen to be drawn for at least 'mtime' seconds.
     """
     now = time()
     if now < self.mtime:
         for _ in rangeF(start=0, stop=self.mtime - now, step=0.01):
             QtWidgets.QApplication.processEvents()
             sleep(0.01)
Example #3
0
 def __init__(self, spec, session):
     """
     Initialize the plugin.
     :type spec: PluginSpec
     :type session: session
     """
     super().__init__(spec, session)
     self.afwset = set()
     self.level = DiagramView.ZoomDefault
     self.levels = [x for x in rangeF(DiagramView.ZoomMin, DiagramView.ZoomMax + DiagramView.ZoomStep, DiagramView.ZoomStep)]
     self.view = None
Example #4
0
 def __init__(self, spec, session):
     """
     Initialize the plugin.
     :type spec: PluginSpec
     :type session: session
     """
     super().__init__(spec, session)
     self.afwset = set()
     self.level = DiagramView.ZoomDefault
     self.levels = [
         x for x in rangeF(DiagramView.ZoomMin, DiagramView.ZoomMax +
                           DiagramView.ZoomStep, DiagramView.ZoomStep)
     ]
     self.view = None
Example #5
0
 def test_generator(self):
     self.assertEqual([0.0, 1.0, 2.0, 3.0], list(rangeF(0.0, 4.0, 1.0)))
     self.assertEqual([0.0, 0.2, 0.4, 0.6, 0.8], list(rangeF(0.0, 1.0,
                                                             0.2)))
     self.assertEqual([0.0000, 0.0001, 0.0002, 0.0003, 0.0004],
                      list(rangeF(0.0000, 0.0005, 0.0001)))
Example #6
0
 def test_generator(self):
     self.assertEqual([0.0, 1.0, 2.0, 3.0], list(rangeF(0.0, 4.0, 1.0)))
     self.assertEqual([0.0, 0.2, 0.4, 0.6, 0.8], list(rangeF(0.0, 1.0, 0.2)))
     self.assertEqual([0.0000, 0.0001, 0.0002, 0.0003, 0.0004], list(rangeF(0.0000, 0.0005, 0.0001)))
Example #7
0
def test_generator():
    assert [0.0, 1.0, 2.0, 3.0] == list(rangeF(0.0, 4.0, 1.0))
    assert [0.0, 0.2, 0.4, 0.6, 0.8] == list(rangeF(0.0, 1.0, 0.2))
    assert [0.0000, 0.0001, 0.0002, 0.0003, 0.0004] == list(rangeF(0.0000, 0.0005, 0.0001))