Skip to content

Commit

Permalink
Add comment for pytest late loading feature
Browse files Browse the repository at this point in the history
This PR seems fine, however lacks a comment for why we would be late
loading the main module. Add it so we can merge rather than go back and
forwards about a minor comment.
  • Loading branch information
jamielennox committed Apr 19, 2022
1 parent bf7273d commit 0aeaecd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requests_mock/contrib/_pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def requests_mock(request):
responses for unit testing. See:
https://requests-mock.readthedocs.io/en/latest/
"""
# pytest plugins get loaded immediately. If we import requests_mock it
# imports requests and then SSL which prevents gevent patching. Late load.
import requests_mock as rm_module

case_sensitive = request.config.getini('requests_mock_case_sensitive')
Expand Down

0 comments on commit 0aeaecd

Please sign in to comment.