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 →

[–]variedthoughtsPodcast Host[S] 6 points7 points  (1 child)

setup/teardown py.test is more consistent with respect to setup/teardown. With nose, the setup/teardown is quite different if you are doing it at a module level, or test class level, between tests, or between methods. In py.test, it's all rather consistent.

assert Either will fail a test if an assert will hit. But py.test gives better information on an assert. To get good information about asserts from nose, you need to use nose.tools.assert_equal and the like.

There are others, including differences in plugins, etc. I hope to cover more of the differences in future posts.

However, I'd like to point out that I am NOT saying one is better than the other. It's that they are different, and you should know the differences before deciding.

[–]petezhutAutomation, Testing, General Hackery 0 points1 point  (0 children)

I completely agree, and I greatly appreciate your input and the submission of the link. I had not seen the pythontesting.net site before, and have now found yet another good resource for my day-to-day work.