@@ -1189,7 +1189,7 @@ def testGuiEditor_Tags(qtbot, monkeypatch, nwGUI, nwMinimal, ipsumText):
11891189
11901190
11911191@pytest .mark .gui
1192- def testGuiEditor_WordCounters (qtbot , monkeypatch , caplog , nwGUI , nwMinimal , ipsumText ):
1192+ def testGuiEditor_WordCounters (qtbot , monkeypatch , nwGUI , nwMinimal , ipsumText ):
11931193 """Test saving text from the editor.
11941194 """
11951195 # Block message box
@@ -1488,3 +1488,30 @@ def testGuiEditor_Search(qtbot, monkeypatch, nwGUI, nwLipsum):
14881488 # qtbot.stopForInteraction()
14891489
14901490# END Test testGuiEditor_Search
1491+
1492+
1493+ @pytest .mark .gui
1494+ def testGuiEditor_StaticMethods ():
1495+ """Test the document editor's static methods.
1496+ """
1497+ # Check the method that decides if it is allowed to insert a space
1498+ # before a colon using the French, Spanish, etc language feature
1499+ assert GuiDocEditor ._allowSpaceBeforeColon ("" , "" ) is True
1500+ assert GuiDocEditor ._allowSpaceBeforeColon ("" , ":" ) is True
1501+ assert GuiDocEditor ._allowSpaceBeforeColon ("some text" , ":" ) is True
1502+
1503+ assert GuiDocEditor ._allowSpaceBeforeColon ("@:" , ":" ) is False
1504+ assert GuiDocEditor ._allowSpaceBeforeColon ("@>" , ">" ) is True
1505+
1506+ assert GuiDocEditor ._allowSpaceBeforeColon ("%" , ":" ) is True
1507+ assert GuiDocEditor ._allowSpaceBeforeColon ("%:" , ":" ) is True
1508+ assert GuiDocEditor ._allowSpaceBeforeColon ("%synopsis:" , ":" ) is False
1509+ assert GuiDocEditor ._allowSpaceBeforeColon ("%Synopsis:" , ":" ) is False
1510+ assert GuiDocEditor ._allowSpaceBeforeColon ("% synopsis:" , ":" ) is False
1511+ assert GuiDocEditor ._allowSpaceBeforeColon ("% Synopsis:" , ":" ) is False
1512+ assert GuiDocEditor ._allowSpaceBeforeColon ("% synopsis:" , ":" ) is False
1513+ assert GuiDocEditor ._allowSpaceBeforeColon ("% Synopsis:" , ":" ) is False
1514+ assert GuiDocEditor ._allowSpaceBeforeColon ("%synopsis :" , ":" ) is True
1515+ assert GuiDocEditor ._allowSpaceBeforeColon ("%Synopsis :" , ":" ) is True
1516+
1517+ # END Test testGuiEditor_StaticMethods
0 commit comments