Add pre-calculation of status icons
This commit is contained in:
@@ -68,9 +68,6 @@ def testCoreStatus_Internal(mockGUI, mockRnd):
|
||||
nStatus = NWStatus(NWStatus.STATUS)
|
||||
nImport = NWStatus(NWStatus.IMPORT)
|
||||
|
||||
with pytest.raises(Exception):
|
||||
NWStatus(999) # type: ignore
|
||||
|
||||
# Generate Key
|
||||
# ============
|
||||
|
||||
@@ -383,6 +380,7 @@ def testCoreStatus_ShapeCache():
|
||||
nabla = shapes.getShape(nwStatusShape.NABLA)
|
||||
diamond = shapes.getShape(nwStatusShape.DIAMOND)
|
||||
pentagon = shapes.getShape(nwStatusShape.PENTAGON)
|
||||
hexagon = shapes.getShape(nwStatusShape.HEXAGON)
|
||||
star = shapes.getShape(nwStatusShape.STAR)
|
||||
pacman = shapes.getShape(nwStatusShape.PACMAN)
|
||||
bars1 = shapes.getShape(nwStatusShape.BARS_1)
|
||||
@@ -404,6 +402,7 @@ def testCoreStatus_ShapeCache():
|
||||
assert shapes.getShape(nwStatusShape.NABLA) is nabla
|
||||
assert shapes.getShape(nwStatusShape.DIAMOND) is diamond
|
||||
assert shapes.getShape(nwStatusShape.PENTAGON) is pentagon
|
||||
assert shapes.getShape(nwStatusShape.HEXAGON) is hexagon
|
||||
assert shapes.getShape(nwStatusShape.STAR) is star
|
||||
assert shapes.getShape(nwStatusShape.PACMAN) is pacman
|
||||
assert shapes.getShape(nwStatusShape.BARS_1) is bars1
|
||||
|
||||
@@ -205,7 +205,7 @@ def testDlgProjSettings_StatusImport(qtbot, monkeypatch, nwGUI, projPath, mockRn
|
||||
status.editName.setText("Final")
|
||||
status.shapeList.setCurrentData(nwStatusShape.CIRCLE, nwStatusShape.SQUARE)
|
||||
status.colButton.click()
|
||||
status.saveButton.click()
|
||||
status.applyButton.click()
|
||||
assert status.listBox.topLevelItemCount() == 4
|
||||
|
||||
assert status.changed is True
|
||||
@@ -281,7 +281,7 @@ def testDlgProjSettings_StatusImport(qtbot, monkeypatch, nwGUI, projPath, mockRn
|
||||
importance.editName.setText("Final")
|
||||
importance.shapeList.setCurrentData(nwStatusShape.TRIANGLE, nwStatusShape.SQUARE)
|
||||
qtbot.mouseClick(importance.colButton, QtMouseLeft)
|
||||
qtbot.mouseClick(importance.saveButton, QtMouseLeft)
|
||||
qtbot.mouseClick(importance.applyButton, QtMouseLeft)
|
||||
assert importance.listBox.topLevelItemCount() == 4
|
||||
|
||||
assert importance.changed is True
|
||||
@@ -375,7 +375,7 @@ def testDlgProjSettings_Replace(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
||||
replace.editValue.setText("")
|
||||
for c in "With This Stuff ":
|
||||
qtbot.keyClick(replace.editValue, c, delay=KEY_DELAY)
|
||||
qtbot.mouseClick(replace.saveButton, QtMouseLeft)
|
||||
qtbot.mouseClick(replace.applyButton, QtMouseLeft)
|
||||
assert replace.listBox.topLevelItem(2).text(0) == "<This>" # type: ignore
|
||||
assert replace.listBox.topLevelItem(2).text(1) == "With This Stuff " # type: ignore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user