Skip to content

Commit 82c2599

Browse files
eli-schwartzambv
andauthored
tests: drop dependency on external mock module for newer python (html5lib#574)
Fixes html5lib#541 Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 4a87368 commit 82c2599

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

html5lib/tests/test_meta.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from __future__ import absolute_import, division, unicode_literals
22

33
import six
4-
from mock import Mock
4+
try:
5+
from unittest.mock import Mock
6+
except ImportError:
7+
from mock import Mock
58

69
from . import support
710

requirements-test.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ pytest>=4.6.10,<5 ; python_version < '3'
66
pytest>=5.4.2,<8 ; python_version >= '3'
77
coverage>=5.1,<6
88
pytest-expect>=1.1.0,<2
9-
mock>=3.0.5,<4 ; python_version < '3.6'
10-
mock>=4.0.2,<5 ; python_version >= '3.6'
9+
mock>=3.0.5,<4 ; python_version < '3.3'
1110
setuptools; python_version >= '3.12'

0 commit comments

Comments
 (0)