Skip to content

Commit

Permalink
Adjust require_version to not require a method for decoration any longer
Browse files Browse the repository at this point in the history
  • Loading branch information
PCManticore committed Apr 9, 2019
1 parent 4c60efc commit c87bea1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions astroid/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import sys
import warnings

import pytest

from astroid import nodes


Expand Down Expand Up @@ -41,13 +43,13 @@ def check_require_version(f):
str_version = ".".join(str(v) for v in sys.version_info)

@functools.wraps(f)
def new_f(self, *args, **kwargs):
def new_f(*args, **kwargs):
if minver is not None:
self.skipTest(
pytest.skip(
"Needs Python > %s. Current version is %s." % (minver, str_version)
)
elif maxver is not None:
self.skipTest(
pytest.skip(
"Needs Python <= %s. Current version is %s." % (maxver, str_version)
)

Expand Down

0 comments on commit c87bea1

Please sign in to comment.