Support Python 2 syntax in test

This commit is contained in:
Matt Wilber 2018-10-18 00:34:42 +00:00 committed by Mahmoud Hashemi
parent 7e51ca4d29
commit 1ee9231fd5
1 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import abc
import string
from abc import abstractmethod, ABC
from abc import abstractmethod, ABCMeta
import pytest
@ -267,7 +267,10 @@ def test_cachedmethod():
def test_cachedmethod_maintains_func_abstraction():
ABC = abc.ABCMeta('ABC', (object,), {})
class Car(ABC):
def __init__(self, cache=None):
self.h_cache = LRI() if cache is None else cache
self.hand_count = 0
@ -314,7 +317,10 @@ def test_cachedproperty():
def test_cachedproperty_maintains_func_abstraction():
ABC = abc.ABCMeta('ABC', (object,), {})
class AbstractExpensiveCalculator(ABC):
@cachedproperty
@abstractmethod
def calculate(self):