Merge branch 'main' into release_2.0rc2

This commit is contained in:
Veronica Berglyd Olsen
2022-11-11 17:22:20 +01:00
11 changed files with 145 additions and 102 deletions
+5 -3
View File
@@ -1,5 +1,5 @@
[Meta]
timestamp = 2022-11-10 11:10:10
timestamp = 2022-11-11 12:48:18
[Main]
theme = default
@@ -46,8 +46,10 @@ repdots = True
scrollpastend = 25
autoscroll = False
autoscrollpos = 30
fmtsinglequote = ,
fmtdoublequote = “, ”
fmtsquoteopen =
fmtsquoteclose =
fmtdquoteopen = “
fmtdquoteclose = ”
fmtpadbefore =
fmtpadafter =
fmtpadthin = False
@@ -1,5 +1,5 @@
[Meta]
timestamp = 2022-11-10 11:10:13
timestamp = 2022-11-11 12:48:20
[Main]
theme = default
@@ -46,8 +46,10 @@ repdots = True
scrollpastend = 0
autoscroll = True
autoscrollpos = 30
fmtsinglequote = ,
fmtdoublequote = “, ”
fmtsquoteopen =
fmtsquoteclose =
fmtdquoteopen = “
fmtdquoteclose = ”
fmtpadbefore =
fmtpadafter =
fmtpadthin = False
+4 -2
View File
@@ -141,8 +141,10 @@ def testBaseConfig_InitLoadSave(monkeypatch, fncPath, tstPaths):
assert newConf.guiSyntax == "bar"
# Test Correcting Quote Settings
tstConf.fmtDoubleQuotes = ["\"", "\""]
tstConf.fmtSingleQuotes = ["'", "'"]
tstConf.fmtDQuoteOpen = "\""
tstConf.fmtDQuoteClose = "\""
tstConf.fmtSQuoteOpen = "'"
tstConf.fmtSQuoteClose = "'"
tstConf.doReplaceDQuote = True
tstConf.doReplaceSQuote = True
assert tstConf.saveConfig() is True
+3 -3
View File
@@ -133,11 +133,11 @@ def testCoreItem_Setters(mockGUI, mockRnd, fncPath):
theItem.setExpanded("What?")
assert theItem.isExpanded is False
theItem.setExpanded("True")
assert theItem.isExpanded is True
assert theItem.isExpanded is False
theItem.setExpanded(True)
assert theItem.isExpanded is True
# Exported
# Active
theItem.setActive(8)
assert theItem.isActive is False
theItem.setActive(None)
@@ -147,7 +147,7 @@ def testCoreItem_Setters(mockGUI, mockRnd, fncPath):
theItem.setActive("What?")
assert theItem.isActive is False
theItem.setActive("True")
assert theItem.isActive is True
assert theItem.isActive is False
theItem.setActive(True)
assert theItem.isActive is True
+6 -6
View File
@@ -432,19 +432,19 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=KEY_DELAY)
# Insert spaces before and after quotes
nwGUI.mainConf.fmtPadBefore = "\u201d"
nwGUI.mainConf.fmtPadAfter = "\u201c"
nwGUI.docEditor._typPadBefore = "\u201d"
nwGUI.docEditor._typPadAfter = "\u201c"
for c in "Some \"double quoted text with spaces padded\".":
qtbot.keyClick(nwGUI.docEditor, c, delay=KEY_DELAY)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=KEY_DELAY)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=KEY_DELAY)
nwGUI.mainConf.fmtPadBefore = ""
nwGUI.mainConf.fmtPadAfter = ""
nwGUI.docEditor._typPadBefore = ""
nwGUI.docEditor._typPadAfter = ""
# Insert spaces before colon, but ignore tags and synopsis
nwGUI.mainConf.fmtPadBefore = ":"
nwGUI.docEditor._typPadBefore = ":"
for c in "@object: NoSpaceAdded":
qtbot.keyClick(nwGUI.docEditor, c, delay=KEY_DELAY)
@@ -466,7 +466,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=KEY_DELAY)
qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=KEY_DELAY)
nwGUI.mainConf.fmtPadBefore = ""
nwGUI.docEditor._typPadBefore = ""
# Indent and Align
# ================
+4 -4
View File
@@ -461,19 +461,19 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockRnd):
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsQuoteLS.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[0]
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSQuoteOpen
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsQuoteRS.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[1]
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSQuoteClose
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsQuoteLD.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[0]
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDQuoteOpen
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsQuoteRD.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[1]
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDQuoteClose
nwGUI.docEditor.clear()
nwGUI.mainMenu.aInsMSApos.activate(QAction.Trigger)