Tests fail with 1.11.2
See original GitHub issueAfter upgrading to 1.11.2, my tests using pytest-mock start failing with the message below. It turns out this change fixes it but it still needs to be released.
I am using pytest 5.2.4
self = <pytest_mock.plugin.MockFixture._Patcher object at 0x104e8c590>
stack = [FrameInfo(frame=<frame at 0x104cfc5c0, file '/Users/powerjo/.local/share/virtualenvs/backend-qQJPOvQO/lib/python3.7/s...92, function='_hookexec', code_context=[' return self._inner_hookexec(hook, methods, kwargs)\n'], index=0), ...]
def _enforce_no_with_context(self, stack):
"""raises a ValueError if mocker is used in a with context"""
caller = stack[1]
frame = caller[0]
info = inspect.getframeinfo(frame)
> code_context = " ".join(info.code_context).strip()
E TypeError: can only join an iterable
../../../../.local/share/virtualenvs/backend-qQJPOvQO/lib/python3.7/site-packages/pytest_mock/plugin.py:167: TypeError
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Stencil e2e tests failing on server - Stack Overflow
I have a stenciljs project with unit and e2e tests that works perfectly locally but fails on server with the given error:.
Read more >How I sped up one of our test suites by 17.5x by ... - Synopsys
Our tests were slowing down at a rate that was causing them to time out, which resulted in failing builds. I could have...
Read more >jQuery 1.11.2 and 2.1.3 Released – Safari Fail-Safe Edition
Another bug that makes it difficult for us to test jQuery on iOS 8 is that the user agent of the simulator is...
Read more >Running unit tests in GitHub Actions - Octopus Deploy
As part of our series about Continuous Integration and build servers, learn how to run unit tests in GitHub Actions and process the...
Read more >1 Common Test Release Notes - Erlang/OTP
If init_per_testcase fails, the test itself is skipped. According to the documentation, it should be possible to change the ... 1.46 Common_Test 1.11.2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @chbndrhnns, thanks for the nudge! 1.12 released. 👍
@richin13 thanks for confirming it. I just released
1.12.1
with a fix for this problem. 👍