Message224798
About the name: abstract_tests could be used e.g.:
@abstract_tests
class AbcSetTests(TestCase):
# test abc.Set
Set = abstract_property()
def setUp(self):
self.set = self.Set('abc')
def test_difference(self):
self.assert...
def test_union(self):
self.assert...
It is clear that AbcSetTests do not run because the class is abstract
(can't create an instance). It is clear that to create a concrete test,
you need to subclass the abstract class (serve as a base class):
class BuiltinSetTests(AbcSetTests):
# test builtins.set
Set = set
class FrozenSetTests(AbcSetTests):
# test frozenset
Set = frozenset
It might not be necessary to enforce all abstract constraints in the
implementation initially. The only thing that needs to be implemented is
that tests from @abstract_tests decorated class should not be run. |
|
Date |
User |
Action |
Args |
2014-08-05 03:15:00 | akira | set | recipients:
+ akira, pitrou, kristjan.jonsson, stutzbach, ezio.melotti, eric.araujo, r.david.murray, michael.foord, BreamoreBoy, zach.ware, serhiy.storchaka, vzhong |
2014-08-05 03:14:59 | akira | set | messageid: <1407208499.94.0.779728448799.issue14534@psf.upfronthosting.co.za> |
2014-08-05 03:14:59 | akira | link | issue14534 messages |
2014-08-05 03:14:59 | akira | create | |
|