Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Neil Girdhar
Like you, I used nose and then switched to pytest. The reason I proposed this for unittest is because pytest and nose and (I think) most of the other testing frameworks inherit from unittest, so improving unittest has downstream benefits. I may nevertheless propose this to the pytest people if th

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Chris Barker
Getting kind of OT, but: ... pytest is too "magical" for you, > I do get confused a bit sometimes, but for the most part, I simple don't use the magic -- pytest does a great job of making the simple things simple. what do you use? Many Python testing tools like nose are just test > *runners*, s

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Chris Barker
On Tue, Aug 22, 2017 at 5:19 PM, Chris Barker wrote: > anyway, that's enough ranting. > Got carried away with the ranting, and didn't flesh out my point. My point is that unittest is a very static, not very pythonic framework -- if you are productive with it, great, but I don't think it's w

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Steven D'Aprano
On Tue, Aug 22, 2017 at 06:20:50PM -0400, rym...@gmail.com wrote: > TBH you're completely right. Every time I see someone using unittest > andItsHorriblyUnpythonicNames, I want to kill a camel. If your only complaint about unittest is that you_miss_writing_underscores_between_all_the_words, then

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Nick Timkovich
Knowing nothing about the JavaScript ecosystem (other than that leftpad is apparently not a joke and everything needs more jQuery), what are the leagues-above testing libraries? On Tue, Aug 22, 2017 at 5:20 PM, rym...@gmail.com wrote: > TBH you're completely right. Every time I see someone using

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread rym...@gmail.com
TBH you're completely right. Every time I see someone using unittest andItsHorriblyUnpythonicNames, I want to kill a camel. Sometimes, though, I feel like part of the struggle is the alternative. If you dislike unittest, but pytest is too "magical" for you, what do you use? Many Python testing too

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Chris Barker
** Caution: cranky curmudgeonly opinionated comment ahead: ** unitest is such an ugly Java-esque static mess of an API that there's really no point in trying to clean it up and make it more pythonic -- go off and use pytest and be happier. -CHB On Tue, Aug 22, 2017 at 5:42 AM, Nick Coghlan w

Re: [Python-ideas] Fwd: Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Nick Timkovich
On Tue, Aug 22, 2017 at 12:34 AM, Nick Coghlan wrote: > Folks, this has come up before, but: please don't post through Google > Groups, as it breaks everyone else's ability to easily reply to the > entire mailing list. > Mentioning this is probably going to do nothing, especially for new, future

Re: [Python-ideas] Please consider adding context manager versions of setUp/tearDown to unittest.TestCase

2017-08-22 Thread Nick Coghlan
On 22 August 2017 at 15:34, Nick Coghlan wrote: > On 21 August 2017 at 11:32, Neil Girdhar wrote: >> This question describes an example of the problem: >> https://stackoverflow.com/questions/8416208/in-python-is-there-a-good-idiom-for-using-context-managers-in-setup-teardown. >> You want to invok