-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
--collectonly
key, 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