python-pid/use-standard-library-mock-when-available.patch
Troy Dawson 187751403f RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/python-pid#9406517b4f5c3b11ce5bf89cc3c38cc594e28d06
2020-10-14 19:35:28 -07:00

17 lines
348 B
Diff

diff --git a/tests/test_pid.py b/tests/test_pid.py
index 7c57c46..e36c29e 100644
--- a/tests/test_pid.py
+++ b/tests/test_pid.py
@@ -2,7 +2,10 @@
import os.path
import signal
from contextlib import contextmanager
-from mock import patch
+try:
+ from unittest.mock import patch
+except ImportError:
+ from mock import patch
import pid