first commit

This commit is contained in:
2026-08-23 09:52:32 +02:00
commit 1a7ed8ef94
94 changed files with 10489 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import unittest
from pathlib import Path
class UI042ScanMenuRegressionTests(unittest.TestCase):
def test_scan_menu_button_has_no_attached_qmenu_indicator(self):
ui = (Path(__file__).resolve().parents[1] / "src/librenet_scanner/ui.py").read_text()
start = ui.index("self.scan_menu_btn = QToolButton()")
end = ui.index("self.stop_btn = QPushButton", start)
block = ui[start:end]
self.assertIn("setArrowType(Qt.DownArrow)", block)
self.assertIn("clicked.connect(self._show_scan_menu)", block)
self.assertNotIn("setMenu(", block)
self.assertNotIn("InstantPopup", block)
def test_scan_profile_menu_is_stored_separately(self):
ui = (Path(__file__).resolve().parents[1] / "src/librenet_scanner/ui.py").read_text()
self.assertIn("self.scan_menu = QMenu(self)", ui)
self.assertIn("self.scan_menu.popup(pos)", ui)
if __name__ == "__main__":
unittest.main()