On Thursday, October 3, 2019 at 2:30:23 AM UTC+2, btheado wrote: > > 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. > > Yes I guess you are right, I just wished to have assertions from pytest. I haven't used any pytest plugin nor its hooks
> 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? > > I have installed pytest 3.8.0 on my machine. Most likely the problem is in pytest incompatible versions. I'll look into it but I can't do it now. 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/2a37ee4a-44e2-4d99-9d42-890fd223c53b%40googlegroups.com.
