Add a main count setting and use it for the project tree
This commit is contained in:
@@ -26,6 +26,7 @@ import pytest
|
||||
|
||||
from PyQt6.QtGui import QIcon
|
||||
|
||||
from novelwriter import CONFIG
|
||||
from novelwriter.core.item import NWItem
|
||||
from novelwriter.core.project import NWProject
|
||||
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
||||
@@ -168,6 +169,15 @@ def testCoreItem_Setters(mockGUI, mockRnd, fncPath):
|
||||
item.setParaCount(1)
|
||||
assert item.paraCount == 1
|
||||
|
||||
# MainCount
|
||||
item.setWordCount(123)
|
||||
item.setCharCount(1234)
|
||||
CONFIG.useCharCount = False
|
||||
assert item.mainCount == 123
|
||||
CONFIG.useCharCount = True
|
||||
assert item.mainCount == 1234
|
||||
CONFIG.useCharCount = False
|
||||
|
||||
# CursorPos
|
||||
item.setCursorPos(None)
|
||||
assert item.cursorPos == 0
|
||||
|
||||
Reference in New Issue
Block a user