Skip to content

Established Standards for Tests #20820

Closed
Closed
@WillAyd

Description

@WillAyd

xref #20813 (comment) there is some inconsistency with how tests are built which we could standardize and cleanup. For example, all of the following may appear in any given test:

# Short variable name notation
res = 'foo'
exp = 'bar'
assert res == exp

# Evaluation as operand
exp = 'bar'
assert some_func() == exp

# Full variable name notation
result = 'foo'
expected = 'bar'
assert result == expected

There are of course many more combinations in between but the above should cover the concept. With the assumption that the last is preferable, the proposal here is to explicitly document that somewhere (perhaps TESTING_README.md?) and beyond that perhaps set up LINTing rules to enforce the standard.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code StyleCode style, linting, code_checksNeeds DiscussionRequires discussion from core team before further actionTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions