Skip to content
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

CI: Disallow bare pytest raise #30737

Closed
wants to merge 1 commit into from

Conversation

ShaharNaveh
Copy link
Member

@ShaharNaveh ShaharNaveh changed the title CI: Added test case CI: Disallow bare pytest raise Jan 6, 2020
@jreback jreback added the CI Continuous Integration label Jan 6, 2020
)
)

for subdir, _, files in os.walk(source_path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it would be nice to encapsulate most of the boiler plate in a common file used in the other validate_* scripts. can you do this as a pre-cursor PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is exactly what I was a about to ask, if I should do so.

The only question I have is how the script should be activated?
for example like this:

./scripts/validate_patterns.py --bare-pytest --concat-strings pandas

or

./scripts/validate_patterns.py --test-cases="barepytest,concatstrins" pandas

@ShaharNaveh
Copy link
Member Author

Closing in favor in #30755

@ShaharNaveh ShaharNaveh closed this Jan 6, 2020
@alimcmaster1
Copy link
Member

Is it possible to do this via regex? similar to the current code check for context manager:
https://github.com/pandas-dev/pandas/blob/master/ci/code_checks.sh#L157

@ShaharNaveh ShaharNaveh deleted the TST-bare-pytest branch January 8, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: Disallow bare pytest.raises
3 participants