Vitalije,

I was looking at the execute-pytest code and it looked to me like only the
assertion rewrite functionality from pytest is being used. I would guess
none of the hooks or fixtures and maybe most plugins will work.

I don't much trust my code reading so I figured I'd better test it, but I
only got a stack trace when trying with your example:

Traceback (most recent call last):

  File "/home/btheado/src/leo-editor/leo/core/leoGlobals.py", line
293, in new_cmd_wrapper
    func(self, event=event)

  File "/home/btheado/src/leo-editor/leo/core/leoCommands.py", line
729, in execute_pytest
    self.execute_single_pytest(p)

  File "/home/btheado/src/leo-editor/leo/core/leoCommands.py", line
761, in execute_single_pytest
    rewrite_asserts(tree, script, config=cfg)

  File 
"/home/btheado/src/pyqt-3.7-venv/lib/python3.7/site-packages/_pytest/assertion/rewrite.py",
line 327, in rewrite_asserts
    AssertionRewriter(module_path, config, source).run(mod)

  File 
"/home/btheado/src/pyqt-3.7-venv/lib/python3.7/site-packages/_pytest/assertion/rewrite.py",
line 572, in __init__
    "enable_assertion_pass_hook"

  File 
"/home/btheado/src/pyqt-3.7-venv/lib/python3.7/site-packages/_pytest/config/__init__.py",
line 976, in getini
    self._inicache[name] = val = self._getini(name)

  File 
"/home/btheado/src/pyqt-3.7-venv/lib/python3.7/site-packages/_pytest/config/__init__.py",
line 987, in _getini
    value = self.inicfg[name]

AttributeError: 'Config' object has no attribute 'inicfg'

python 3.7.3 and pytest 5.2.0

Do you have any ideas?

On Thu, Sep 26, 2019 at 6:31 AM vitalije <[email protected]> wrote:

> Hm, looking in the output it seems that the name of the test node, and
> failed test function in the output are missed. Revision 064e218
> <http://064e218b75dc2f90d0fb53317fb34895750a8a91> fixes this. Now the
> output is like:
>
> -------example/test_a failed---------
> assert 4 == 4.1
>  +  where 4 = inc(3)
> -------example/test_b failed---------
> assert 18.299999999999997 == 18
>  +  where 18.299999999999997 = times_3(6.1)
>  +    where 6.1 = add_2(4.1)
>  +      where 4.1 = inc(3.1)
>  +  and   18 = times_3(6)
>  +    where 6 = inc(5)
> failed:2 tests
>
> Vitalije
>
> --
> 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/b7880eb4-9c2f-4d37-932d-d1f0d72fcfe3%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/b7880eb4-9c2f-4d37-932d-d1f0d72fcfe3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAO5X8Cwq6XSp%2B3gRnTiWzcSyVMSYxbYgeWV43togHiB_7x4eGA%40mail.gmail.com.

Reply via email to