pyinfra icon indicating copy to clipboard operation
pyinfra copied to clipboard

Mention end-to-end tests in `contributing.md`/Tests

Open phlummox opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe

Running the end-to-end tests when doing development on pyinfra seems like a good idea, but they're not enabled by default - so contributors may be missing bugs that don't get caught until the Github "workflows" are run. Perhaps the contributing.md file could include a mention of how to run them?

Describe the solution you'd like

I'd suggest just adding a second paragraph to the "Tests" section of contributing.md, with details on how to run the end-to-end tests - see here. Happy to create a pull request if desired.

phlummox avatar Jul 15 '22 09:07 phlummox

As an aside: running the end-to-end tests as a developer is much more pleasant if you can actually see what they're doing as they progress, i.e. logging the output as well as capturing it. For my own use, I amended conftest.py to do this, here —

https://github.com/phlummox-dev/pyinfra/commit/be35c458518e02300f8d11d73d5225f7fa8141cc

— but that might have unexpected effects on the tests. (e.g. some of the end-to-end tests seem to make use of a very short timeout, and just logging the output of pyinfra seems to cause them to fail.)

phlummox avatar Jul 16 '22 10:07 phlummox

Hi @phlummox thank you for raising this, will definitely add to the contributing doc ASAP!

Also thank you for the changes to show the output; this is actually very similar to pyinfra's own gevent buffer reading used by connectors (https://github.com/Fizzadar/pyinfra/blob/87fb7a0f936f605484355bd1547c0fccfacdc246/pyinfra/connectors/util.py#L94) :) Will also incorporate a way to do that because it's extremely useful for debugging.

Fizzadar avatar Aug 14 '22 07:08 Fizzadar