Make python3-mock dependency optional

https://fedoraproject.org/wiki/Changes/RemovePythonMockUsage

Prefer using unittest.mock to a standalone package. The separate
packages should only really be needed on Python 2.7 these days.

The test requirements file is updated to only require mock on old
Python, and the dependency is removed from setup.py to avoid issues
there.

Relates: https://src.fedoraproject.org/rpms/pungi/pull-request/9

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2024-01-26 08:38:32 +01:00
parent dd7ecbd5fd
commit ff5a7e6377
49 changed files with 201 additions and 51 deletions

View file

@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import mock
try:
from unittest import mock
except ImportError:
import mock
import os
import shutil
import six