assertStartWith vs assertStartwith

I recommend assertStartsWith() and assertEndsWith(), both for readability and for accessibility – screen readers will have a better chance with the extra capitals and it helps people with dyslexia and cognitive disabilities.

It doesn’t really matter that str.startswith is all lower case, because we’re creating a new method name.

All the other methods follow the same capitalisation rule.

For example, the one that checks checks isinstance is assertIsInstance and not assertIsinstance.

Here’s similar accessibility advice about hashtags:

See also Change environment variable style - #2 by hugovk.

12 Likes