Open ssbarnea opened 3 years ago
I thought this was my other pytest plugin and was confused about how this could possibly work (my other plugin makes heavy use of fixtures, so the def test_foo(fixturename)
is important).
I'd take a PR to do this, if it preserved the existing behaviour as well (it should be a non breaking change for pytest-docker-tools).
(I guess that's an important bit of context, this plugin really only exists for pytest-docker-tools
).
Instead of requiring use of pytest test definition, the python snippets should be evaluated as a standalone test that just needs to be executed.
Example:
If that is found, a test should be generated for it, one that just runts the code inside the snippet.
Reasoning: README.md examples do aim to be as short as possible in order to demonstrate functionality. By avoiding the boilerplate test methods we keep them easy to read.