from PyQt5.QtTest import QSignalSpy, QTest

from extra_foam.pipeline.tests import _RawDataMixin

from extra_foam.special_suite import logger, mkQApp
from extra_foam.special_suite.gotthard_pump_probe_proc import GotthardPpProcessor
from extra_foam.special_suite.gotthard_pump_probe_w import (
    GotthardPumpProbeWindow, GotthardPpImageView, GotthardPpFomMeanPlot,
    GotthardPpFomPulsePlot, GotthardPpRawPulsePlot, GotthardPpDarkPulsePlot)
from extra_foam.special_suite.special_analysis_base import ProcessingError

from . import _SpecialSuiteWindowTestBase, _SpecialSuiteProcessorTestBase

app = mkQApp()

logger.setLevel('INFO')


class TestGotthardPpWindow(_SpecialSuiteWindowTestBase):
    @classmethod
    def setUpClass(cls):
        cls._win = GotthardPumpProbeWindow('SCS')

    @classmethod
    def tearDownClass(cls):
        # explicitly close the MainGUI to avoid error in GuiLogger
        cls._win.close()

    @staticmethod
    def data4visualization(n_pulses=5, n_on=2, n_off=2):
        """Override."""
Esempio n. 2
0
import unittest

from extra_foam.special_suite import logger, mkQApp
from extra_foam.special_suite.facade import _SpecialSuiteFacadeBase

app = mkQApp()

logger.setLevel('CRITICAL')


class TestFacade(unittest.TestCase):
    def _create_facade(self, n_analysis):
        window_isntance_types = []
        for i in range(n_analysis):
            if n_analysis == 2:
                window_isntance_types.append(
                    type(f"DummyWindow{i}", (), {
                        "icon": "Gotthard.png",
                        "_title": "title"
                    }))
            else:
                window_isntance_types.append(
                    type(f"DummyWindow{i}", (), {
                        "icon": "Gotthard.png",
                        "_title": str(i)
                    }))

        class SampleFacade(_SpecialSuiteFacadeBase):
            def __init__(self):
                super().__init__("DET")