Skip to content

Commit

Permalink
Adapt test to run on Python 2+
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 26, 2021
1 parent ca43622 commit 83f1a2f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test_singledispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,15 @@ def test_false_meta(self):
class MetaA(type):
def __len__(self):
return 0
class A(metaclass=MetaA):
pass
if sys.version_info < (3,):
class A(object):
__metaclass__ = MetaA
else:
"""
class A(metaclass=MetaA):
pass
"""
A = MetaA('A', (), {})
class AA(A):
pass
@functools.singledispatch
Expand Down

0 comments on commit 83f1a2f

Please sign in to comment.