PR #3390 (more options work) merged into devel

21 views
Skip to first unread message

Edward K. Ream

unread,
Jun 17, 2023, 10:36:25 AM6/17/23
to leo-editor
The devel branch now contains PR #3390, the latest work on Leo's options code.

I've merged this branch early for several reasons:

- Thomas has signed off on the code.
- Because of the reorg, the diffs in the PR are almost useless.
- New unit tests cover all the code.
- We should all test the code asap.

Edward

Edward K. Ream

unread,
Jun 17, 2023, 10:44:55 AM6/17/23
to leo-editor
On Saturday, June 17, 2023 at 9:36:25 AM UTC-5 Edward K. Ream wrote:

I've merged this branch early for several reasons

I prefer speed over agonizing :-) I want devel to contain the latest code so we can all test it.

The devel branch should be safe enough: the new unit tests found more errors in two hours than in the previous four days.

Any remaining problems will be fixed in a small PR.

Edward

Edward K. Ream

unread,
Jun 17, 2023, 10:54:19 AM6/17/23
to leo-editor
On Saturday, June 17, 2023 at 9:44:55 AM UTC-5 Edward K. Ream wrote:

>...the new unit tests found more errors in two hours than in the previous four days.

The test of LM.scanOptions knows nothing about scanOptions. The test is valid however code works.

In other words, this test should have been added 20 years ago!

Edward

Thomas Passin

unread,
Jun 17, 2023, 11:29:05 AM6/17/23
to leo-editor
Run from the leo-editor directory:
py -m pytest

[snip]
leo\unittests\core\test_leoImport.py:106: AssertionError
============================ warnings summary ============================
leo\plugins\leo_babel\tests\lib_test.py:118
  C:\Tom\git\leo-editor\leo\plugins\leo_babel\tests\lib_test.py:118: PytestCollectionWarning: cannot collect test class 'TestCmdr' because it has a __init__ constructor (from: leo/plugins/leo_babel/tests/lib_test.py)
    class TestCmdr:

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== short test summary info =========================
FAILED leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import - AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
========== 1 failed, 851 passed, 1 skipped, 1 warning in 14.21s ==========


Not a surprise since it's looking for a specific directory on @ekr's machine.

Edward K. Ream

unread,
Jun 17, 2023, 2:03:14 PM6/17/23
to leo-e...@googlegroups.com
On Sat, Jun 17, 2023 at 10:29 AM Thomas Passin <tbp1...@gmail.com> wrote:

FAILED leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import - AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
========== 1 failed, 851 passed, 1 skipped, 1 warning in 14.21s ==========


Not a surprise since it's looking for a specific directory on @ekr's machine.

Well, this failure surprised me :-) The test calls only RecursiveImportController.minimize_headline, and this method does only string (path) computations. The method does not test whether the path exists.

However, changing 'ekr-mypy2' to 'non-existent-directory' does in fact fail on my machine.  I'm on it.

Edward
Reply all
Reply to author
Forward
0 new messages