Skip to content

Remove redundant Python 3.6 code #9461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions testing/python/approx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import operator
import sys
from contextlib import contextmanager
from decimal import Decimal
from fractions import Fraction
Expand Down Expand Up @@ -810,7 +809,6 @@ def test_nonnumeric_false_if_unequal(self, x):
assert 1.0 != approx([None])
assert None != approx([1.0]) # noqa: E711

@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires ordered dicts")
def test_nonnumeric_dict_repr(self):
"""Dicts with non-numerics and infinites have no tolerances"""
x1 = {"foo": 1.0000005, "bar": None, "foobar": inf}
Expand Down
7 changes: 0 additions & 7 deletions testing/test_assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ def test_mojibake(self) -> None:


class TestAssert_reprcompare_dataclass:
@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_dataclasses(self, pytester: Pytester) -> None:
p = pytester.copy_example("dataclasses/test_compare_dataclasses.py")
result = pytester.runpytest(p)
Expand All @@ -815,7 +814,6 @@ def test_dataclasses(self, pytester: Pytester) -> None:
consecutive=True,
)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_recursive_dataclasses(self, pytester: Pytester) -> None:
p = pytester.copy_example("dataclasses/test_compare_recursive_dataclasses.py")
result = pytester.runpytest(p)
Expand All @@ -834,7 +832,6 @@ def test_recursive_dataclasses(self, pytester: Pytester) -> None:
consecutive=True,
)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_recursive_dataclasses_verbose(self, pytester: Pytester) -> None:
p = pytester.copy_example("dataclasses/test_compare_recursive_dataclasses.py")
result = pytester.runpytest(p, "-vv")
Expand Down Expand Up @@ -867,7 +864,6 @@ def test_recursive_dataclasses_verbose(self, pytester: Pytester) -> None:
consecutive=True,
)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_dataclasses_verbose(self, pytester: Pytester) -> None:
p = pytester.copy_example("dataclasses/test_compare_dataclasses_verbose.py")
result = pytester.runpytest(p, "-vv")
Expand All @@ -881,7 +877,6 @@ def test_dataclasses_verbose(self, pytester: Pytester) -> None:
]
)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_dataclasses_with_attribute_comparison_off(
self, pytester: Pytester
) -> None:
Expand All @@ -891,15 +886,13 @@ def test_dataclasses_with_attribute_comparison_off(
result = pytester.runpytest(p, "-vv")
result.assert_outcomes(failed=0, passed=1)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_comparing_two_different_data_classes(self, pytester: Pytester) -> None:
p = pytester.copy_example(
"dataclasses/test_compare_two_different_dataclasses.py"
)
result = pytester.runpytest(p, "-vv")
result.assert_outcomes(failed=0, passed=1)

@pytest.mark.skipif(sys.version_info < (3, 7), reason="Dataclasses in Python3.7+")
def test_data_classes_with_custom_eq(self, pytester: Pytester) -> None:
p = pytester.copy_example(
"dataclasses/test_compare_dataclasses_with_custom_eq.py"
Expand Down