Test Coverage of the Editor (#787)

* Drop the _qDocument class variables
* Split up the current doceditor test file
* Add tests for editor init, load and save
* Add tests for editor meta functions and actions
* Add tests for editor insert functions
* Add tests for editor text manipulation and block formatting
* Fix code style
* Add text coverage for alignment and indent
This commit is contained in:
Veronica Berglyd Olsen
2021-07-05 16:10:52 +02:00
committed by GitHub
parent 1d16cc2a03
commit 36be7b0b33
7 changed files with 1892 additions and 657 deletions
+3 -3
View File
@@ -261,11 +261,11 @@ class GuiDocHighlighter(QSyntaxHighlighter):
"""Loop through all blocks and rehighlight those of a given
content type.
"""
qDocument = self.document()
nBlocks = qDocument.blockCount()
qDoc = self.document()
nBlocks = qDoc.blockCount()
bfTime = time()
for i in range(nBlocks):
theBlock = qDocument.findBlockByNumber(i)
theBlock = qDoc.findBlockByNumber(i)
if theBlock.userState() & theType > 0:
self.rehighlightBlock(theBlock)
afTime = time()