aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pytest
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-04-24 22:11:05 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-04-24 22:11:05 +0300
commit7f5e1f5ef44ca7b0cddee7ef62f932851755448b (patch)
tree3f58cd8e1121c199dab668088bbd6cd4bf41b175 /contrib/python/pytest
parentd3dcefce22da142f53fd9af30dda58955f889e48 (diff)
downloadydb-7f5e1f5ef44ca7b0cddee7ef62f932851755448b.tar.gz
intermediate changes
ref:d4b5687d4c7a66b907f70930ef85d76f209837f1
Diffstat (limited to 'contrib/python/pytest')
-rw-r--r--contrib/python/pytest/py3/.dist-info/METADATA6
-rw-r--r--contrib/python/pytest/py3/AUTHORS2
-rw-r--r--contrib/python/pytest/py3/README.rst4
-rw-r--r--contrib/python/pytest/py3/_pytest/_version.py4
-rw-r--r--contrib/python/pytest/py3/_pytest/assertion/util.py6
-rw-r--r--contrib/python/pytest/py3/_pytest/nodes.py2
-rw-r--r--contrib/python/pytest/py3/_pytest/python_api.py5
-rw-r--r--contrib/python/pytest/py3/_pytest/tmpdir.py5
8 files changed, 19 insertions, 15 deletions
diff --git a/contrib/python/pytest/py3/.dist-info/METADATA b/contrib/python/pytest/py3/.dist-info/METADATA
index 4ea30c4b7d..85dffa1ebe 100644
--- a/contrib/python/pytest/py3/.dist-info/METADATA
+++ b/contrib/python/pytest/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest
-Version: 7.1.1
+Version: 7.1.2
Summary: pytest: simple powerful testing with Python
Home-page: https://docs.pytest.org/en/latest/
Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
@@ -73,8 +73,8 @@ Requires-Dist: xmlschema ; extra == 'testing'
:target: https://codecov.io/gh/pytest-dev/pytest
:alt: Code coverage Status
-.. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
- :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
+.. image:: https://github.com/pytest-dev/pytest/workflows/test/badge.svg
+ :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Atest
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/main
diff --git a/contrib/python/pytest/py3/AUTHORS b/contrib/python/pytest/py3/AUTHORS
index 2b6ca66de7..c0d1236b8b 100644
--- a/contrib/python/pytest/py3/AUTHORS
+++ b/contrib/python/pytest/py3/AUTHORS
@@ -185,6 +185,7 @@ Katerina Koukiou
Keri Volans
Kevin Cox
Kevin J. Foley
+Kian Eliasi
Kian-Meng Ang
Kodi B. Arfer
Kojo Idrissa
@@ -255,6 +256,7 @@ Ondřej Súkup
Oscar Benjamin
Parth Patel
Patrick Hayes
+Paul Müller
Pauli Virtanen
Pavel Karateev
Paweł Adamczak
diff --git a/contrib/python/pytest/py3/README.rst b/contrib/python/pytest/py3/README.rst
index f0fe356321..034034a40b 100644
--- a/contrib/python/pytest/py3/README.rst
+++ b/contrib/python/pytest/py3/README.rst
@@ -20,8 +20,8 @@
:target: https://codecov.io/gh/pytest-dev/pytest
:alt: Code coverage Status
-.. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
- :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
+.. image:: https://github.com/pytest-dev/pytest/workflows/test/badge.svg
+ :target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Atest
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/main
diff --git a/contrib/python/pytest/py3/_pytest/_version.py b/contrib/python/pytest/py3/_pytest/_version.py
index 5fe9be4576..90941616ba 100644
--- a/contrib/python/pytest/py3/_pytest/_version.py
+++ b/contrib/python/pytest/py3/_pytest/_version.py
@@ -1,5 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '7.1.1'
-version_tuple = (7, 1, 1)
+version = '7.1.2'
+version_tuple = (7, 1, 2)
diff --git a/contrib/python/pytest/py3/_pytest/assertion/util.py b/contrib/python/pytest/py3/_pytest/assertion/util.py
index 03167ddd47..b1f168767b 100644
--- a/contrib/python/pytest/py3/_pytest/assertion/util.py
+++ b/contrib/python/pytest/py3/_pytest/assertion/util.py
@@ -437,8 +437,10 @@ def _compare_eq_cls(left: Any, right: Any, verbose: int) -> List[str]:
if not has_default_eq(left):
return []
if isdatacls(left):
- all_fields = left.__dataclass_fields__
- fields_to_check = [field for field, info in all_fields.items() if info.compare]
+ import dataclasses
+
+ all_fields = dataclasses.fields(left)
+ fields_to_check = [info.name for info in all_fields if info.compare]
elif isattrs(left):
all_fields = left.__attrs_attrs__
fields_to_check = [field.name for field in all_fields if getattr(field, "eq")]
diff --git a/contrib/python/pytest/py3/_pytest/nodes.py b/contrib/python/pytest/py3/_pytest/nodes.py
index e49c1b003e..1a168043a4 100644
--- a/contrib/python/pytest/py3/_pytest/nodes.py
+++ b/contrib/python/pytest/py3/_pytest/nodes.py
@@ -111,7 +111,7 @@ def _imply_path(
NODE_CTOR_FSPATH_ARG.format(
node_type_name=node_type.__name__,
),
- stacklevel=3,
+ stacklevel=6,
)
if path is not None:
if fspath is not None:
diff --git a/contrib/python/pytest/py3/_pytest/python_api.py b/contrib/python/pytest/py3/_pytest/python_api.py
index ea646811dd..5fa2196192 100644
--- a/contrib/python/pytest/py3/_pytest/python_api.py
+++ b/contrib/python/pytest/py3/_pytest/python_api.py
@@ -319,7 +319,6 @@ class ApproxSequenceLike(ApproxBase):
def _repr_compare(self, other_side: Sequence[float]) -> List[str]:
import math
- import numpy as np
if len(self.expected) != len(other_side):
return [
@@ -340,7 +339,7 @@ class ApproxSequenceLike(ApproxBase):
abs_diff = abs(approx_value.expected - other_value)
max_abs_diff = max(max_abs_diff, abs_diff)
if other_value == 0.0:
- max_rel_diff = np.inf
+ max_rel_diff = math.inf
else:
max_rel_diff = max(max_rel_diff, abs_diff / abs(other_value))
different_ids.append(i)
@@ -573,7 +572,7 @@ def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase:
>>> {'a': 0.1 + 0.2, 'b': 0.2 + 0.4} == approx({'a': 0.3, 'b': 0.6})
True
- The comparision will be true if both mappings have the same keys and their
+ The comparison will be true if both mappings have the same keys and their
respective values match the expected tolerances.
**Tolerances**
diff --git a/contrib/python/pytest/py3/_pytest/tmpdir.py b/contrib/python/pytest/py3/_pytest/tmpdir.py
index f901fd5727..12dc463a2a 100644
--- a/contrib/python/pytest/py3/_pytest/tmpdir.py
+++ b/contrib/python/pytest/py3/_pytest/tmpdir.py
@@ -158,9 +158,10 @@ class TempPathFactory:
def get_user() -> Optional[str]:
"""Return the current user name, or None if getuser() does not work
in the current environment (see #1010)."""
- import getpass
-
try:
+ # In some exotic environments, getpass may not be importable.
+ import getpass
+
return getpass.getuser()
except (ImportError, KeyError):
return None