Pytest has @pytest.mark.filterwarnings
using:
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
works like a charm but I don't want to ignore all DeprecationWarning I want to ignore a specific one:
warnings.warn("Please use new_module.", DeprecationWarning)
I tried to do:
@pytest.mark.filterwarnings("ignore::DeprecationWarning: Please use new_module.")
but this doesn't work. I can't find the proper syntax to filter a specific message.
how can this be done?