diff --git a/soitool/soi.py b/soitool/soi.py index 1394c197930cf1d12415a66482c15343565d5cb6..714b6c61f1657889fb686736675d85779152b24e 100644 --- a/soitool/soi.py +++ b/soitool/soi.py @@ -501,7 +501,7 @@ class SOI: name : str Name of new module widget_implementation : subclass of ModuleBase - The widget implementation of the module. + An instance of the widget implementation of the module. is_attachment : bool True if the module should be added as an attachment. False otherwise diff --git a/test/test_module_freetext.py b/test/test_module_freetext.py index f7ec78d6cdc6f9588af652274a0bc7530d219e0e..f3cb74638451dea0cca501a7a0a98dd0a891bf6b 100644 --- a/test/test_module_freetext.py +++ b/test/test_module_freetext.py @@ -6,6 +6,7 @@ from PySide2.QtWidgets import QApplication, QWidget, QVBoxLayout from PySide2.QtCore import Qt from PySide2.QtTest import QTest from soitool.modules.module_freetext import FreeTextModule +from soitool.soi import SOI if isinstance(QtGui.qApp, type(None)): app = QApplication([]) @@ -62,6 +63,13 @@ class TestFreeTextModuleWithSetUp(unittest.TestCase): self.assertTrue(before_width < after_width) self.assertTrue(before_height < after_height) + def test_add_to_soi_smoke_test(self): + """Test that can add to SOI without explosions.""" + soi = SOI() + test_name = "Test name" + soi.add_module(test_name, self.freetext_module, False) + self.assertTrue(soi.module_name_taken(test_name)) + class TestFreeTextModuleWithoutSetUp(unittest.TestCase): """TestCase for FreeTextModule without setUp."""