diff --git a/tests/test_autorepr.py b/tests/test_autorepr.py index acea367..2f59b05 100644 --- a/tests/test_autorepr.py +++ b/tests/test_autorepr.py @@ -1,4 +1,3 @@ -import sys from textwrap import dedent from unittest.mock import Mock @@ -89,19 +88,13 @@ def __init__(self, a, b): pass -@pytest.mark.skipif(sys.version_info < (3,), reason="Requires Python 3") def test_kwonly(): - code = dedent( - """ - with pytest.raises(ValueError): - @autorepr(positional='a') - class A: - def __init__(self, *, a): - pass - """ - ) + with pytest.raises(ValueError): - exec(code) + @autorepr(positional="a") + class A: + def __init__(self, *, a): + pass def test_exceptions(): @@ -161,7 +154,6 @@ def __init__(self, a, b): assert repr(a) == "A(a=1, b=2)" -@pytest.mark.skipif(sys.version_info < (3, 2), reason="Requires Python 3.2+") def test_recursive_repr(): """Test that autorepr applies the :func:`reprlib.recursive_repr` decorator.""" diff --git a/tests/test_helper.py b/tests/test_helper.py index 704e6f6..800a0de 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -1,4 +1,3 @@ -import sys import textwrap import pytest @@ -205,7 +204,6 @@ def _repr_helper_(self, r): assert pretty(ce) == textwrap.dedent(prettystr).lstrip() -@pytest.mark.skipif(sys.version_info < (3, 2), reason="Requires Python 3.2+") def test_helper_mixin_recursive(): """Test that the mixin applies the :func:`reprlib.recursive_repr` decorator."""