Skip to content

Established Standards for Tests #20820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WillAyd opened this issue Apr 25, 2018 · 1 comment
Closed

Established Standards for Tests #20820

WillAyd opened this issue Apr 25, 2018 · 1 comment
Labels
Code Style Code style, linting, code_checks Needs Discussion Requires discussion from core team before further action Testing pandas testing functions or related to the test suite

Comments

@WillAyd
Copy link
Member

WillAyd commented Apr 25, 2018

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?

@jbrockmendel
Copy link
Member

jbrockmendel commented Jul 25, 2018

Linting this sounds hard. I think there is enough cleanup needed in tests in general that this is a non-issue.

@jbrockmendel jbrockmendel added Testing pandas testing functions or related to the test suite Code Style Code style, linting, code_checks labels Jul 30, 2018
@simonjayhawkins simonjayhawkins added the Needs Discussion Requires discussion from core team before further action label Dec 11, 2019
@WillAyd WillAyd closed this as completed Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks Needs Discussion Requires discussion from core team before further action Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

3 participants