Commit bae0ba9
mock_open's _exit_side_effect had a fixed 3-arg signature, but
contextlib.ExitStack calls __exit__ with 4 args (self + 3 exc info).
Use *args to accept any number of arguments.
(cherry picked from commit 85fa295)
Co-authored-by: Zang Peiyu <166481866+factnn@users.noreply.github.com>
1 parent de8d7bb commit bae0ba9
3 files changed
Lines changed: 11 additions & 1 deletion
File tree
- Lib
- test/test_unittest/testmock
- unittest
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
2104 | 2113 | | |
2105 | 2114 | | |
2106 | 2115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2991 | 2991 | | |
2992 | 2992 | | |
2993 | 2993 | | |
2994 | | - | |
| 2994 | + | |
2995 | 2995 | | |
2996 | 2996 | | |
2997 | 2997 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments