Project tree status and total word count changes (#882)
* Fix some inconsistencies in source file docstrings * Remove the option to show status text in project tree * Change how total word counts are calculated and propagated * Fix tests and improve coverage * Add setting in preferences * Add missing word count timer to config file
This commit is contained in:
committed by
GitHub
parent
b9311e84ce
commit
3c8cb34b0a
@@ -868,12 +868,9 @@ def testCoreProject_Methods(monkeypatch, nwMinimal, mockGUI, tmpDir):
|
||||
assert theProject.statusItems._theCounts == [1, 1, 1, 2, 0]
|
||||
assert theProject.importItems._theCounts == [3, 0, 0, 1, 0]
|
||||
|
||||
# Check word counts
|
||||
# Session stats
|
||||
theProject.currWCount = 200
|
||||
theProject.lastWCount = 100
|
||||
assert theProject.getSessionWordCount() == 100
|
||||
|
||||
# Session stats
|
||||
with monkeypatch.context() as mp:
|
||||
mp.setattr("os.path.isdir", lambda *a, **k: False)
|
||||
assert not theProject._appendSessionStats(idleTime=0)
|
||||
@@ -888,8 +885,8 @@ def testCoreProject_Methods(monkeypatch, nwMinimal, mockGUI, tmpDir):
|
||||
statsFile = os.path.join(theProject.projMeta, nwFiles.SESS_STATS)
|
||||
|
||||
theProject.projOpened = 1600002000
|
||||
theProject.novelWCount = 200
|
||||
theProject.notesWCount = 100
|
||||
theProject.currNovelWC = 200
|
||||
theProject.currNotesWC = 100
|
||||
|
||||
with monkeypatch.context() as mp:
|
||||
mp.setattr("novelwriter.core.project.time", lambda: 1600005600)
|
||||
|
||||
Reference in New Issue
Block a user