Yesterday's Engineering Notebook post was full of details. Today's report 
will be shorter and less technical.

Work has reached a big milestone. All the new unit tests for 
leo/commands/editCommands.py now pass. The key was creating a parent node 
to hold Leo directives. Many commands depend on @pagewidth and @tabwidth 
directives, so the testing framework must provide a place for them.

Other tests failed because of ludicrous testing hacks in the commands 
themselves, which individual (new style) tests now work around in various 
ways. For now, and probably "forever", I'll leave Leo's core as it is so 
that unitTest.leo will continue to work.

*Considerable work remains*

1. At present, the unit tests only verify that the various commands change 
the body text as expected. Tests that the selection range changes as 
expected fail. This should be straightforward to fix. Similarly, the 
undo/redo tests should be re-enabled.

2. The new-style tests don't need the "workNode" node. This node is useful 
when using unitTest.leo, but not in the new testing world.

3. I shall soon create a leo/unittest directory to hold *separate* testing 
files. I now see that I don't want to "pollute" Leo's sources with test 
code:

- Using separate test files is the usual practice.
- The test code adds unnecessary length to the coverage reports and skews 
coverage statistics.

Important: I don't want to put test files in the existing leo/test 
directory. That directory has lots of cruft that would complicate test 
discovery. leo/test will stay exactly as it is. 

*Summary*

All the new unit tests for leo/commands/editCommands.py now pass. Several 
more days of work remain.

My focus remains on the sabbatical. However, it would be unbearable to 
leave the new unit testing work unfinished. Yes, this "interrupts" the 
sabbatical, but I can see no practical psychological alternative.

Leaving leoTest.py unchanged has been the correct decision. I'll deprecate 
unitTest.leo, but unitTest.leo, and all its support code in leoTest.py, 
will remain "forever".

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dd24c6b4-cae2-49a4-bd66-f58ddf0a7b31n%40googlegroups.com.

Reply via email to