forked from pool/python-bindep
* Remove use of external mock module, try unittest.mock first. - Switch to pyproject macros. - Actually run the testsuite using pytest. - Stop using %python_sitelib/* OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bindep?expand=0&rev=10
33 lines
999 B
Diff
33 lines
999 B
Diff
Index: bindep-2.11.0/bindep/tests/test_main.py
|
|
===================================================================
|
|
--- bindep-2.11.0.orig/bindep/tests/test_main.py
|
|
+++ bindep-2.11.0/bindep/tests/test_main.py
|
|
@@ -24,7 +24,10 @@ from fixtures import FakeLogger
|
|
from fixtures import Fixture
|
|
from fixtures import MonkeyPatch
|
|
from fixtures import TempDir
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
from testtools import TestCase
|
|
|
|
from bindep.__main__ import main
|
|
Index: bindep-2.11.0/bindep/tests/test_depends.py
|
|
===================================================================
|
|
--- bindep-2.11.0.orig/bindep/tests/test_depends.py
|
|
+++ bindep-2.11.0/bindep/tests/test_depends.py
|
|
@@ -23,7 +23,10 @@ from textwrap import dedent
|
|
|
|
import distro
|
|
import fixtures
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import ometa.runtime
|
|
from testtools import ExpectedException
|
|
from testtools.matchers import Contains
|