We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Greetings, I am using pytest-freezegun with parametrize and come across an interesting problem. Imagine, your code is
pytest-freezegun
parametrize
@pytest.mark.parametrize('param', (1, 2)) @pytest.mark.freeze_time('2021-01-01', ignore=['asyncio']) async def test_smth(param): pass
Since there is https://github.com/ktosiek/pytest-freezegun/blob/master/pytest_freezegun.py#L35, we won't get asyncio ignored on the second call.
asyncio
What do you think about deepcopy kwargs? So, the code would look like
deepcopy
from copy import deepcopy ... @pytest.fixture(name=FIXTURE_NAME) def freezer_fixture(request): ... if marker: kwargs_copy = deepcopy(marker.kwargs) ignore = kwargs_copy.pop('ignore', []) args = marker.args kwargs = kwargs_copy
The text was updated successfully, but these errors were encountered:
at this stage the default ignores already include _pytest.terminal an…
94f6e8d
…d _pytest.runner, so it is not necessary to add these (see https://github.com/spulec/freezegun\#ignore-packages). user should probably also make use of extend_ignore_list to just add to default ignores. as a bonus, avoiding to mutate ignore kwarg should avoid ktosiek/pytest-freezegun#30
No branches or pull requests
Greetings,
I am using
pytest-freezegun
withparametrize
and come across an interesting problem.Imagine, your code is
Since there is https://github.com/ktosiek/pytest-freezegun/blob/master/pytest_freezegun.py#L35, we won't get
asyncio
ignored on the second call.What do you think about
deepcopy
kwargs?So, the code would look like
The text was updated successfully, but these errors were encountered: