`AssertFunctionIsCalled` fails to unpatch target
See original GitHub issueAssertFunctionIsCalled
does not exit mock.patch
if the assertion fails:
https://github.com/cupy/cupy/blob/c0c99108b78f4480b17cdf22ba3e903eb65f3646/cupy/testing/helper.py#L1441-L1444
As a consequence, CI reports weird failures.
- The first failure is
TestCubReduction_param_5_{backend='device', order='F', shape=(10, 20)}.test_cub_max
onassert self.handle.call_count == int(self.times_called)
inAssertFunctionIsCalled.__exit__
. - The second failure is
TestCubReduction_param_5_{backend='device', order='F', shape=(10, 20)}.test_cub_min
onassert cupy_r.shape == numpy_r.shape
, wherecupy_r.shape == ()
,numpy_r.shape == (20,)
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
unittest.mock — mock object library — Python 3.11.1 ...
The function is called with the same arguments as the mock, and unless it returns DEFAULT , the return value of this function...
Read more >mocked function is called but fails assert_called test
assert_called() is called, it throws: AssertionError: Expected 'mock_2' to have been called. I've tried several ways using patch and patch.
Read more >RuntimeError: CUDA error: device-side assert triggered - GitHub
I did a pytorch and cuda downgrade to conda install pytorch=0.4.1 cuda90 -c pytorch, now it works. Any idea why the new versions...
Read more >Troubleshooting a failed canary - Amazon CloudWatch
In the CloudWatch console, choose Canaries in the navigation pane and then choose the name of the canary to open the canary details...
Read more >Frequently Asked Questions (FAQ)
The cgo program provides the mechanism for a “foreign function interface” to allow safe calling of C libraries from Go code. SWIG extends...
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
For record, the shuffle configuration (
ID=20
) indaily_master_cupy-shuffled/378
isOkay. Then I’ll merge #4233 with closing this issue, and post another that addresses the first issue.