Skip to content

Always get ESP log output but only reset for different pytest fixture scopes (class, module, ...) (RDT-1472) #369

@lovetheguitar

Description

@lovetheguitar

Is your feature request related to a problem? Please describe.
We like to see the ESP serial logging output and also want to reset/reflash the ESP under certain circumstances.
So far we only found requiring the dut fixture in every test to see the log output which also resets every time.

This takes a lot of time.
Describe the solution you'd like
We'd like to control this via pytest's fixture scopes. I.e. for some test modules only reflash/reset on a module level. For some other tests on class level. Especially we often do not want to reset between different test parametrizations of the same test.

Describe alternatives you've considered
Did not find any other way to enable us to see the log output of the ESP yet. Also checked all your fixtures and the only ones that are initialized with a non default function scope (session scope) are caches and some directories. (https://github.com/search?q=repo%3Aespressif%2Fpytest-embedded%20scope%3D&type=code)

Additional context
Moving all the fixture scopes to class scope should work easily (as they behave similarly in most cases as the default function scope, unless used on a class, but IIRC even there parametrize with indirect=True allows setting the scope back to previous behavior).

Thanks for your support. :)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions