programming, python 

Most of the pytest unit test code I'm looking at ends up turning into giant write-once files (revisit only if tests fail) that are impossible to navigate -- do folks know of open source projects in the Python world that do a really exemplary job organizing their tests (not just the files, but the contents of said files, and the names/object hierarchy of the tests)?

Follow

re: programming, python 

@eloquence I will add that the widget tests like the name suggest is about GUI.

It is whole other story to test GUI stuff.

Ask web frontned people.

Otherwise, I do not mind large files (especially if they use mostly functions).

I prefer side-effects free functions, I test only the public interface and particular difficult implementation details.

Regarding GUI, I only do nominal tests.

In particular testing for side-effects like "click this button, receive an email" is verrrrrrrrrrrry painful.

The advantage of Declarative GUI, is that you can serialize the GUI and test using xpath or whatever whether a particular element is present or not.

Web 0 0 0
Sign in to participate in the conversation
Functional Caf茅

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!