[pytest-dev] Not running standard pytest collector for file spec/*_spec.py
nicoddemus at gmail.com
Tue Mar 13 06:56:58 EDT 2018
On Tue, Mar 13, 2018 at 7:49 AM Ringo De Smet <ringo.de.smet at ontoforce.com>
> On Tue, Mar 13, 2018 at 11:32 AM, Bruno Oliveira <nicoddemus at gmail.com>
>> But looking at your original error more closely:
>> spec/action_base_spec.py:20: in <module>
>> with description('ActionBase') as self:
>> E AttributeError: __enter__
>> It is not clear to me why this is breaking because of the python plugin;
>> can you share `action_base_spec.py` and your plugin code?
> Not for the moment. I have a request pending with the management team if
> it is OK for them to release this plugin as OpenSource.
> I understand why it fails though. When you try to run this as a regular
> pytest/unittest, the `with` block is being interpreted. A with block
> requires an __enter__ and __exit__ definition. Disabling the python plugin
> prevents this interpretation.
Hmm but that's how Python (the language, not the plugin) interprets `with`
blocks, it is not clear why the internal plugin would have anything to do
with that. Well, it is hard to tell without looking at the code.
Sorry I be of more help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pytest-dev