Ignore --clean-alluredir when using --collectonly - #753
Conversation
|
Good idea! Also, it makes sense for all args that don't cause test running. |
For --setup-plan, the situation is a little different, because if with |
|
And what about |
|
@delatrie could you look at this PR pls? |
delatrie
left a comment
There was a problem hiding this comment.
Hi! And sorry, it took me so long.
I like this feature!
It would be nice to have tests though. Could you, please, add an acceptance test for each package involved? Something like this should work:
def test_no_clean_if_collectonly(allure_pytest_runner: AllurePytestRunner):
alluredir = allure_pytest_runner.pytester.path
allure_pytest_runner.in_memory = False
allure_pytest_runner.run_pytest(
"def test_fn(): pass",
cli_args=["--collectonly", "--clean-alluredir"]
)
assert alluredir.joinpath("test_collectonly.py").exists()And the same goes for allure-pytest-bdd, but the fixture would be allure_pytest_bdd_runner: AllurePytestRunner.
If you have any struggles, feel free to ping me here.
@delatrie done |
|
Great, thanks! |
Context
When displaying a list of tests with the
--collectonlykey, the last test execution result is cleared.To prevent the result from being lost, added ignoring cleaning (
--clean-alluredir) if there is a key to only output the list of tests (--collectonly).Checklist