#596 Use unittest.mock on Python 3
Closed by onosek. Opened by churchyard.
churchyard/rpkg nomock  into  master

Download 596.patch

See https://bugzilla.redhat.com/show_bug.cgi?id=2029012#c5
And https://fedoraproject.org/wiki/Changes/DeprecatePythonMock#How_to_migrate_to_unittest.mock

With this change, it passed for me:

diff --git a/tox.ini b/tox.ini
index 26d780c..99490d2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,7 +13,6 @@ basepython=
     flake8python2: {env:TOXPYTHON:python2.7}
 deps =
-    rpm-py-installer
     -r{toxinidir}/requirements/pypi.txt
     -r{toxinidir}/requirements/test-pypi.txt
@@ -23,7 +22,7 @@ commands =
 setenv=
     PYCURL_SSL_LIBRARY=openssl
-[testenv:py39]
+[testenv:py310]
 # allow gi & libmodulemd for flatpak tests. System libraries are available for Python 3.9
 sitepackages=true

The CI also seems happy.

rebased onto 0faab2234cddc6afad5b85fd54e486f0edce661a

Thank you for the code.

Commit 98ab0cd fixes this pull-request

PR is actually merged (with minor manual updates), but I forgot to add the correct trigger/comment that closes this PR automatically after the merge. So I have to close it manually.

Pull-Request has been closed by onosek

Metadata