because of the absence of unittest.mock on python2.7, we still fallback to mock
fixes: #4195
Metadata Update from @julian8628: - Pull-request tagged with: no_qe
4 new commits added
setuptools is required by devtools/check-api (py3)
sort imports in tests/
fix unittest without /usr/bin/python on newer os
unittest: use unittest.mock instead of mock
2 new commits added
Metadata Update from @jcupova: - Pull-request untagged with: no_qe
dropping no_qe tag until review is completed
This seems fine overall.
Technically, we only need to worry about the fallback import for the py2-relevant tests, but should be harmless to have it everywhere.
You've added a commit to sort imports, which seems reasonable given that we're creating a lot of churn in that area anyway. However, your sort does not quite agree with what isort does for me locally. If I run isort tests, I see a number of changes across hundreds of files on top of what you have here. Mainly:
isort tests
There are a handful of test files that isort wants to change that were not otherwise changed by your PR, but the vast majority overlap with your PR. Are we seeing variation in isort behavior? I've got python3-isort-5.13.2-1.fc39.noarch.
Guessing the differences are caused by different isort config here: https://pagure.io/koji/pull-request/4243#_1__23-31
isort
I can drop the import sorting commit and we could probably deal it in #4243
I added the fallback import in tests/test_lib so that it can be checked with py2 as well (it would have been added as koji lib still supports py 2.7). I submitted PR #4248 for this
tests/test_lib
rebased onto 589e6bbb960421b6835a61d1d0c0622b27357405
removed
Technically, we only need to worry about the fallback import for the py2-relevant tests
ah, my mistake, you only have the fallback in build/cli/lib/plugins tests. Easy to miss with 390 files changed ;)
:thumbsup:
Metadata Update from @mikem: - Pull-request tagged with: no_qe
Commit 57040f73 fixes this pull-request
Pull-Request has been merged by mikem
because of the absence of unittest.mock on python2.7, we still fallback to mock
fixes: #4195