On Fri, May 20, 2022 at 3:32 PM Edward K. Ream <edream...@gmail.com> wrote:
On Sunday, May 1, 2022 at 3:54:07 AM UTC-5 viktor....@gmail.com wrote: > > 1. I am not going to change Leo's test-all command so that it works in > python/site-packages/leo. The workaround is easy: run `python -m unittest` > from python/site-packages/leo. > The workaround won't work :-) Indeed, many unit tests contain the line: import leo.core.leoGlobals as g Alas, this import assumes that the cwd is the parent directory of the leo directory. After `pip install leo`, the parent directory is python/Lib/sitecustomize, and we definitely should not (can not) run `python -m unittest` from there! In short, none of Leo's test (or cover) commands will work when using `pip install leo`. Altering sys.path before running each test would pollute *every* test file, including leoTest2.py. I'm not going to do it. *Summary* setup.py installs leo, not leo-editor. We can't run unit tests from the site-packages folder! Installing leo-editor instead of leo would be a major change to Leo's pypi distribution. I'm not going to even consider such a change. In short, there is no feasible way to run Leo's test and cover commands after `pip install leo`. 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0VuHeE_eU35kWgmeb81j%2B9XmiYkhb9_oVXHZicG1L%2B9A%40mail.gmail.com.