Skip to content

Commit 7fb0b30

Browse files
committed
fix python 2.7 compatibility
1 parent 7cae02f commit 7fb0b30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/inheritance_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import pytest
2+
from six import add_metaclass
23

34
from custom_inherit import DocInheritMeta
45

56

67
@pytest.mark.parametrize("style", ["numpy_with_merge", "numpy_napoleon_with_merge"])
78
def test_inheritance_numpy_with_merge_styles(style):
8-
class Parent(metaclass=DocInheritMeta(style=style)):
9+
@add_metaclass(DocInheritMeta(style=style))
10+
class Parent(object):
911
"""Parent.
1012
1113
Notes
@@ -96,7 +98,8 @@ def meth(self, x, y=None):
9698

9799

98100
def test_inheritance_google_with_merge_style():
99-
class A(metaclass=DocInheritMeta(style="google_with_merge")):
101+
@add_metaclass(DocInheritMeta(style="google_with_merge"))
102+
class A(object):
100103
"""Testing A.
101104
102105
Args:

0 commit comments

Comments
 (0)