GitHubJacksonized

Defer xfail condition evaluation with muthaf*ckin' xfail_if_raises context manager by elovelan · Pull Request #2153 · gitpython-developers/GitPython

The @pytest.mark.xfail decorator with raises=... evaluates its condition
during test collection, which can trigger external calls (e.g.,
Git().config()) that have side effects. Introduce xfail_if_raises as a
context manager that delays this evaluation until test execution time,
and apply it to test_index_mutation.

Originally published at github.com. Every curse word you see was added by the Samuel L. Jacksonizer, a parody site. Not affiliated with Samuel L. Jackson or github.com.