Hacker Newsnew | past | comments | ask | show | jobs | submit | w0tintarnation's commentslogin

Do you have an opinion on grouping pytest tests in classes?

    class Test_my_function:
        def with_default_arguments(self):
        def with_some_other_arguments(self):
If you can make your eye stop twitching after seeing snake cased class names, this is at least another option of grouping tests for a single function.


They're already grouped by module which normally provides enough granularity (in my experience, I've only scaled this up to 50k LOC apps though so YMMV).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: