1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
From: s3v <c0llapsed@yahoo.it>
Date: Thu, 12 Dec 2024 23:15:11 +0000
Subject: Switch to unittest.mock
Origin: other, https://bugs.debian.org/1088224#15
Bug-Debian: https://bugs.debian.org/1088224
Last-Update: 2024-12-12
---
cloud_sptheme/tests/test_ext_relbar_toc.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cloud_sptheme/tests/test_ext_relbar_toc.py b/cloud_sptheme/tests/test_ext_relbar_toc.py
index 8b9357a..529d9fa 100644
--- a/cloud_sptheme/tests/test_ext_relbar_toc.py
+++ b/cloud_sptheme/tests/test_ext_relbar_toc.py
@@ -10,7 +10,7 @@ import logging
log = logging.getLogger(__name__)
import os
# site
-import mock
+from unittest import mock
# pkg
from .utils import TestCase, unittest
# subject
@@ -46,8 +46,8 @@ class UtilsTestCase(TestCase):
# patch sphinx's _() to be noop
patch = mock.patch.object(relbar_links, "_", side_effect=lambda s: s)
- self.addCleanup(patch.__exit__)
- patch.__enter__()
+ patch.start()
+ self.addCleanup(patch.stop)
def test_insert_no_links(self):
"""
|