Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit41294d5
committed
Use the mock backport on Python 3.7
Because mock.call.kwargs, i.e. the ability to examinem.call_args.kwargs where m is a Mock or MagicMock, was introducedin Python 3.8.Currently it is only in test/test_git.py that any use of mocksrequires this, so I've put the conditional import logic to importmock (the top-level package) rather than unittest.mock only there.The mock library is added as a development (testing) dependencyonly when the Python version is lower than 3.8, so it is notinstalled when not needed.This fixes a problem in the new tests of whether a shell is used,and reported as used, in the Popen call in Git.execute. Thosejust-introduced tests need this, to be able to usemock_popen.call_args.kwargs on Python 3.7.1 parentda3460c commit41294d5
2 files changed
+8
-2
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
| 4 | + | |
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 |
| |
18 | 23 |
| |
19 | 24 |
| |
|
0 commit comments
Comments
(0)