[issue17519] unittest should not try to run abstract classes

2021-04-01 Thread Stephen Thorne
Stephen Thorne added the comment: I have done some experimentation here and thought through this feature request. The concept we are trying to deliver is: "I would like to share functionality between test classes, by having an abstract parent, with concrete leaves" The metaclass abc.ABCMeta

[issue17519] unittest should not try to run abstract classes

2021-03-28 Thread Nathaniel Manista
Nathaniel Manista added the comment: michael.foord: I am now persuaded that the feature requested here ought be reconsidered (since my last comment there's been a lot of chatter about it behind closed doors at work, but I can at least cite https://github.com/abseil/abseil-py/issues/166 as a

[issue17519] unittest should not try to run abstract classes

2021-03-11 Thread Nathaniel Manista
Nathaniel Manista added the comment: In the years since this was considered and declined, I wonder if the facts have changed sufficiently to make it now worth doing? I often find myself writing TestCases for interfaces, and those define test_* methods that call the interface under test, but

[issue17519] unittest should not try to run abstract classes

2020-04-23 Thread Nathaniel Manista
Change by Nathaniel Manista : -- nosy: +Nathaniel Manista ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17519] unittest should not try to run abstract classes

2013-03-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: behavior - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17519 ___

[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Éric Piel
New submission from Éric Piel: Since Python 2.6 there is the notion if abstract class (ABC). It could be useful to use it for test cases, but unittest doesn't support it. Typically, I'd like to test a bunch of classes which all should behave similarly (at least for some cases). So I'd like to

[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Éric Piel
Changes by Éric Piel p...@delmic.com: Added file: http://bugs.python.org/file29545/fake_abc.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17519 ___ ___

[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread R. David Murray
R. David Murray added the comment: I leave it to Michael to decide if your suggestion is a good addition :) I personally don't see anything wrong with fake_abc.py...the stdlib test suite uses that idom extensively. Other developers insist it should be called a mixin instead of a base class,

[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Michael Foord
Michael Foord added the comment: As David says, the current workaround is to provide a mixin (base) class that inherits from object. Because this doesn't inherit from TestCase there is no confusion. We *may* add a class marker that allows you to provide TestCase subclasses that won't be run.