Pascal Chambon <chambon.pas...@gmail.com> added the comment:

(Redirected here from https://bugs.python.org/issue37262)

I haven't dug the assertThat() idea, but why not make, as a first step, turn 
assertion methods in TestCase to staticmethods/classmethods, instead of 
instance methods?

Since they (to my knowledge) don't need to access an instance dict, they could 
be turned into such instance-less methods, and thus be usable from other 
testing frameworks (like pytest, for those who want to use pytest fixtures and 
yet benefit from advanced assertions like Django's TestCase's assertions).

"failureException" and others are meant to be (sub)class attributes, so no 
backwards incompatible change should occur (unless someone did really weird 
things with manually instantiated TestCases).

----------
nosy: +pakal

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue19645>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to