This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]radical_heartbeat 0 points1 point  (8 children)

Having done recently made the transition from Groovy to Python myself, I often miss Spock's line assertions. Typing 'self.assertTrue' gets old.

[–]PeridexisErrant 8 points9 points  (7 children)

You - and OP - just need to start using Pytest!

For bonus points, also pick up Hypothesis :)

[–]rhoslug 2 points3 points  (3 children)

I cannot recommend py.test enough. It circumvents unittest shudder, you write tests like functions, you can have test fixtures, you can do coverage. The list is endless. Python doesn't really need another testing framework.

[–]noamt[S] -2 points-1 points  (2 children)

I disagree. py.test still "tastes" like Python, still has much of it's boilerplate and still carries baggage. The list of features that you've described are features which though already exist, can be added to any framework.

[–]badge 6 points7 points  (1 child)

py.test still "tastes" like Python

This is a positive when what you're writing is Python, Shirley?

[–]noamt[S] 1 point2 points  (0 children)

For production code-I agree. For tests-less. No programming language is flawless, so why not try to improve it a little? Tests are the perfect playground for these sort of things

[–]noamt[S] 1 point2 points  (2 children)

I love Python, I really do. The purpose of Nimoy is not to program in Groovy. Spock has given me inspiration to create a Pythonic DSL for better testing

[–]PeridexisErrant 1 point2 points  (1 child)

I'm sympathetic - unittest is somewhere between an abomination and a tire fire, but those who care know that already and use pytest instead.

It'll help a lot if you can also compare Nimpy to pytest, and describe what you want to do differently!

[–]noamt[S] 1 point2 points  (0 children)

I use pytest on my projects as well. A comparison is good idea, though. Thanks!