Commit 85fa295
authored
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.
1 parent 2027088 commit 85fa295
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 | |
|---|---|---|---|
| |||
2108 | 2108 | | |
2109 | 2109 | | |
2110 | 2110 | | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
2111 | 2120 | | |
2112 | 2121 | | |
2113 | 2122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3010 | 3010 | | |
3011 | 3011 | | |
3012 | 3012 | | |
3013 | | - | |
| 3013 | + | |
3014 | 3014 | | |
3015 | 3015 | | |
3016 | 3016 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments