# Amend Python test naming guidelines in Developer Guide Following RFC-229

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
1
• Sprint:
• Team:

#### Description

Amend the Developer Guide to require that test modules be prefixed with test_ to enable automatic pytest discovery:

 tests/test_example.py 

See RFC-229.

#### Activity

Hide
Tim Jenness added a comment -

I don't think this ticket should be blocked by DM-8467. I think we can change the naming guidelines any time. What's blocked is mass renaming of current test files whilst the pybind11 port is ongoing.

Show
Tim Jenness added a comment - I don't think this ticket should be blocked by DM-8467 . I think we can change the naming guidelines any time. What's blocked is mass renaming of current test files whilst the pybind11 port is ongoing.
Hide
Tim Jenness added a comment -

This change looks good to me. I have added Kian-Tat Lim as reviewer since it involves the style guide.

Show
Tim Jenness added a comment - This change looks good to me. I have added Kian-Tat Lim as reviewer since it involves the style guide.
Hide
Jonathan Sick added a comment -

This looks fine.

I'd be tempted to introduce a new section to the Python Style Guide called "Unit Testing" that collects all guidelines specific to unit testing (see also DM-7450). The Python Unit Testing page https://developer.lsst.io/coding/python_testing.html would continue as an informative guide.

I don't know if we want to implement that organization now, or if Kian-Tat Lim is fine with this implementation.

Show
Jonathan Sick added a comment - This looks fine. I'd be tempted to introduce a new section to the Python Style Guide called "Unit Testing" that collects all guidelines specific to unit testing (see also DM-7450 ). The Python Unit Testing page https://developer.lsst.io/coding/python_testing.html would continue as an informative guide. I don't know if we want to implement that organization now, or if Kian-Tat Lim is fine with this implementation.
Hide
Kian-Tat Lim added a comment -

The text and changes look fine. When this is announced on Community, the recommended transition plan (presumably "as you go" with a check-off list, as mentioned in RFC-229) should be publicized as well.

Show
Kian-Tat Lim added a comment - The text and changes look fine. When this is announced on Community, the recommended transition plan (presumably "as you go" with a check-off list, as mentioned in RFC-229 ) should be publicized as well.
Hide
Kian-Tat Lim added a comment -

Collecting testing-relevant guidelines into a separate section may make sense but can be separate from this.

Show
Kian-Tat Lim added a comment - Collecting testing-relevant guidelines into a separate section may make sense but can be separate from this.
Hide
Krzysztof Findeisen added a comment -

Jonathan Sick, RFC-229 mentions a checklist for migrated packages. Is there something like that already?

Show
Krzysztof Findeisen added a comment - Jonathan Sick , RFC-229 mentions a checklist for migrated packages. Is there something like that already?
Hide
Krzysztof Findeisen added a comment -

Following discussion with Jonathan Sick, I've merged the developer guide changes. He will set up a check-off list and announce it on Community.

Show
Krzysztof Findeisen added a comment - Following discussion with Jonathan Sick , I've merged the developer guide changes. He will set up a check-off list and announce it on Community.
Hide
Krzysztof Findeisen added a comment -

Confluence page linked from RFC-229 and community.lsst.org. Thanks Jonathan Sick!

Show
Krzysztof Findeisen added a comment - Confluence page linked from RFC-229 and community.lsst.org . Thanks Jonathan Sick !

#### People

Assignee:
Krzysztof Findeisen
Reporter:
Jonathan Sick
Reviewers:
Jonathan Sick, Kian-Tat Lim
Watchers:
Jonathan Sick, Kian-Tat Lim, Krzysztof Findeisen, Tim Jenness