I created a class by using the abstract class in Python(2.7) and now I want to test this class by Nose. How to implement it technically?
Here I give an example code:
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod, abstractproperty
class A(object):
__metaclass__ = ABCMeta
@abstractproperty
def a(self):
pass
@abstractmethod
def do(self, obj):
pass
Aucun commentaire:
Enregistrer un commentaire