Opened 8 years ago

Closed 8 years ago

#14521 closed (invalid)

Camel case used for mthods' names

Reported by: gurunars Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Check the following paragraph

For example, the code does not look consistent when you use def testFluffyAnimals instead of def test_fluffy_animals.

Change History (3)

comment:1 Changed 8 years ago by Simon Meers

I imagine this is partly because of unittest's camel-case convention for setUp and tearDown -- it would look inconsistent with those otherwise. Though having said that I write my own test_method_names_like_this_too. Probably doesn't really matter. Other opinions?

comment:2 in reply to:  1 Changed 8 years ago by Karen Tracey

Replying to DrMeers:

Yes, I expect setUp and tearDown are likely responsible for the sometimes-used camel case in tests. So long as we are consistent within a class I think it is fine, camel case test method names are perfectly valid and sometimes used as the convention.

comment:3 Changed 8 years ago by Simon Meers

Resolution: invalid
Status: newclosed

For the sake of consistency, one could argue that test_send_email further down that page should actually be converted to camel case, but it really doesn't matter. As Karen mentioned, consistency within classes is the main issue.

Note: See TracTickets for help on using tickets.
Back to Top