One of the most common examples of where we can drop an imperative verb prefix on a method name is in testing.

Unless a framework — such as pytest — requires 'test', such a prefix serves no useful purpose. It qualifies as a noise word, simply repeated what we already know from annotations/attributes, context, etc.

Stepping away from the imperative mood frees up the name (and the developer) to focus on naming a test more in terms of intent and purpose than as a directed action.

@kevlin TBH I find no value in giving names to tests

@kevlin

Here's a suite for testing the parser in the editor I develop. None of the tests is named:

https://github.com/panicz/grasp/blob/main/src/test-parser.scm

Here's a test suite for editing. None of the tests is named:

https://github.com/panicz/grasp/blob/main/src/test-editor-operations.scm

Here's a regression test suite. None of the tests is named:

https://github.com/panicz/grasp/blob/main/src/test-regressions.scm

and so on.

I don't see how adding names to those tests would add any value.

grasp/src/test-parser.scm at main · panicz/grasp

The GRAphical Scheme Programming Environment. Contribute to panicz/grasp development by creating an account on GitHub.

GitHub
@kevlin of course, this is largely because the value of those tests comes from the quality which perhaps phenomenologists would call "givennes" or "sensual immediacy" (and for which I think most people have no name)