about the tryStar test fail:
I've stepped in the test running in a debugger, and in leoAst,
the ast.parse call fails (when stepping into it brings us into
usr/lib/python3.10/ast.py's parse function) and it throws an error in it's
call to 'compile' function.:
* return compile(source, filename, mode, flags,
_feature_version=feature_version)*
Can't step into that since it's a native python lib. Anyways, it doesnt
like the "*" asterisks of the test_TryStar contents, which i've checked to
be somewhat ok while stepping in the code:
try:
print('a1')
print('a2')
except* ImportError:
print('b1')
print('b2')
except* SyntaxError:
print('c1')
print('c2')
else:
print('d1')
finally:
print('e1')
print('e2')
I dont know much about this 'ast' business, :) so i dont really know what
to check for...
anyways, no biggie, let me know if there's any specific thing you'd like
me to try out to help fix those tests :)
Félix
On Monday, June 19, 2023 at 11:05:45 PM UTC-4 Félix wrote:
> and on ubuntu with python 3.10 i also get that test_tryStar one, along
> with the test_recursive_import one that checks for an absolute path
> starting with "C:\" on linux systems (wich fails.)
>
> Since the minimize_headline contains this line:
> *os.path.isabs(self.root_directory)*
> should the unittest check to give a path that is particular for
> windows/vs/posix file paths?
>
> e.g.: (from test_g_finalize and test_g_finalize_join, in
> test_leoGlobals.py)
> *expected_leo_base = 'C:/leo_base' if g.isWindows else '/leo_base'*
>
> (i'll investigate for the tryStar test fail in test_leoAst also soon)
>
> ======================================================================
> FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line
> 1138, in test_TryStar
> self.make_data(contents)
> File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line
> 181, in make_data
> self.fail('make_tree failed') # pragma: no cover
> AssertionError: make_tree failed
>
> ======================================================================
> FAIL: test_recursive_import
> (leo.unittests.core.test_leoImport.TestLeoImport)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/felix/leo-editor/leo/unittests/core/test_leoImport.py", line
> 105, in test_recursive_import
> x.minimize_headline(root)
> File "/home/felix/leo-editor/leo/core/leoImport.py", line 1785, in
> minimize_headline
> assert os.path.isabs(self.root_directory)
> AssertionError
>
> ----------------------------------------------------------------------
> Ran 853 tests in 9.405s
>
> FAILED (failures=2, skipped=18)
> On Monday, June 19, 2023 at 8:54:43 PM UTC-4 Félix wrote:
>
>> on my old windows laptop, with python 3.9.6, i still get one failed test.
>> Screenshot below:
>> [image: still-single-unit-test-fail-python396.png]
>>
>>
>> On Monday, June 19, 2023 at 8:58:17 AM UTC-4 Edward K. Ream wrote:
>>
>>>
>>>
>>> On Mon, Jun 19, 2023 at 7:21 AM Thomas Passin <[email protected]> wrote:
>>>
>>> Thanks for your tests. I'm not worried about warnings.
>>>
>>> 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/96ff529c-64f2-446b-9914-b6a734ab1a71n%40googlegroups.com.