PR #3389 (in devel) concludes work on handling options

34 views
Skip to first unread message

Edward K. Ream

unread,
Jun 16, 2023, 5:37:42 PM6/16/23
to leo-editor
PR #3389 defines four simple helper functions in leoGlobals.py.

Imo these four functions do more than the entire argparse module. They are simpler, easier and more flexible.

Thanks again to Thomas for his careful reading of the code.

Edward

Félix

unread,
Jun 16, 2023, 10:32:42 PM6/16/23
to leo-editor
devel fails this single test on windows (not sure if related or if its a real problem) :

./leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import Failed: 'path: ekr-mypy2/mypy' != 'path: mypy'
- path: ekr-mypy2/mypy
+ path: mypy

  File "C:\Python311\Lib\unittest\case.py", line 57, in testPartExecutor
    yield
  File "C:\Python311\Lib\unittest\case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "C:\Python311\Lib\unittest\case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "c:\prog\leo-editor\leo\unittests\core\test_leoImport.py", line 106, in test_recursive_import
    self.assertEqual(root.h, expected)
AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
- path: ekr-mypy2/mypy
+ path: mypy

Edward K. Ream

unread,
Jun 17, 2023, 12:54:25 AM6/17/23
to leo-editor
On Friday, June 16, 2023 at 9:32:42 PM UTC-5 Félix wrote:
devel fails this single test on windows (not sure if related or if its a real problem) :

The test works for me with python 3.11 on Windows. I have no idea how it could fail for you.

Edward

Viktor Ransmayr

unread,
Jun 17, 2023, 2:13:29 AM6/17/23
to leo-editor
Hello Edward,

I tested the 'leo-editor:devel' branch again in a Fedora 37 VM.

Running Leo's unit tests reports one error:

::

    (Leo) [user@fedora-leo-study-vm Leo]$
    (Leo) [user@fedora-leo-study-vm Leo]$ cd leo-editor/leo
    (Leo) [user@fedora-leo-study-vm leo]$ python -m unittest
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ......................F.........................................................
    ............................s...................................................
    .....................
    (python:1804): Gdk-CRITICAL **: 08:03:14.903: gdk_atom_intern: assertion 'atom_name != NULL' failed

    (python:1804): Gdk-CRITICAL **: 08:03:14.903: gdk_atom_intern: assertion 'atom_name != NULL' failed
    .........s......................................................................
    ....................cursesGui2.py: Tk module required for clipboard handling.
    s.........
    ======================================================================
    FAIL: test_recursive_import (unittests.core.test_leoImport.TestLeoImport.test_recursive_import)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/core/test_leoImport.py", line 106, in test_recursive_import

        self.assertEqual(root.h, expected)
    AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
    - path: ekr-mypy2/mypy
    + path: mypy


    ----------------------------------------------------------------------
    Ran 851 tests in 5.954s

    FAILED (failures=1, skipped=3)
    (Leo) [user@fedora-leo-study-vm leo]$

 With kind regards,

Viktor

Edward K. Ream

unread,
Jun 17, 2023, 2:26:35 PM6/17/23
to leo-e...@googlegroups.com
On Sat, Jun 17, 2023 at 1:13 AM Viktor Ransmayr <viktor....@gmail.com> wrote:


I tested the 'leo-editor:devel' branch again in a Fedora 37 VM.

Running Leo's unit tests reports one error:

Thanks for this report. I have modified the unit test so it fails on my machine. I'll fix this issue next.

Edward
Reply all
Reply to author
Forward
0 new messages