mirror of
https://github.com/jopohl/urh.git
synced 2026-03-10 10:16:48 +01:00
31 lines
834 B
Python
31 lines
834 B
Python
import unittest
|
|
|
|
from PyQt5.QtTest import QTest
|
|
|
|
import tests.startApp
|
|
from urh.controller.MainController import MainController
|
|
|
|
app = tests.startApp.app
|
|
|
|
|
|
class TestSignalTabGUI(unittest.TestCase):
|
|
def setUp(self):
|
|
self.form = MainController()
|
|
|
|
def test_close_all(self):
|
|
# Add a bunch of signals
|
|
NUM_SIGNALS = 10
|
|
for _ in range(NUM_SIGNALS):
|
|
self.form.add_signalfile("./data/esaver.complex")
|
|
|
|
QTest.qWait(10)
|
|
self.assertEqual(self.form.signal_tab_controller.num_signals, NUM_SIGNALS)
|
|
|
|
self.form.close_all()
|
|
QTest.qWait(10)
|
|
self.assertEqual(self.form.signal_tab_controller.num_signals, 0)
|
|
|
|
self.form.add_signalfile("./data/ask.complex")
|
|
QTest.qWait(10)
|
|
self.assertEqual(self.form.signal_tab_controller.num_signals, 1)
|