-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(WIP) Fix urllib3 patching urllib3 matchers do not work at the moment Enable pook in test case
- Loading branch information
1 parent
5681c8e
commit 7aeab1f
Showing
5 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
|
||
import pook | ||
|
||
|
||
@pytest.fixture | ||
def pook_on(): | ||
""" | ||
Safely toggle pook on before a test, then off afterwards. | ||
@pook.on does not mix with pytest marks. This works around | ||
that limitation. | ||
""" | ||
pook.on() | ||
yield | ||
pook.off() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ commands = | |
pytest | ||
|
||
[testenv:py36] | ||
requires = virtualenv<20.22.0 | ||
commands = | ||
pytest -k 'not aiohttp' |