Import Mapping and Sequence from compat in python_api::approx

Related to https://github.com/pytest-dev/pytest/issues/3339

Fixes a DeprecationWarning on Python 3.7

Adds Mapping to compat
This commit is contained in:
Miro Hrončok
2018-05-22 21:58:31 +02:00
parent 6c8d46d8ea
commit 5072226f69
4 changed files with 9 additions and 3 deletions

View File

@@ -426,7 +426,7 @@ def approx(expected, rel=None, abs=None, nan_ok=False):
__ https://docs.python.org/3/reference/datamodel.html#object.__ge__
"""
from collections import Mapping, Sequence
from _pytest.compat import Mapping, Sequence
from _pytest.compat import STRING_TYPES as String
from decimal import Decimal