Skip to content

"check" mode for integration tests #954

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
nschloe opened this issue Jun 8, 2019 · 1 comment
Closed

"check" mode for integration tests #954

nschloe opened this issue Jun 8, 2019 · 1 comment
Labels
question Further information is requested

Comments

@nschloe
Copy link

nschloe commented Jun 8, 2019

I would like to have something like isort --check ... that returns 0 if no changes would be applied, and 1 otherwise.

@timothycrosley
Copy link
Member

timothycrosley commented Jun 9, 2019

Hi @nschloe,

isort does have such an option :) and even better it is --check. You can combine it with --diff to show you what isort would change when 1 status code is returned.

For example:

isort --check --diff . -rc

Will run isort recursively throughout a project returning 0 if nothing would change and 1 if something would change, while displaying those proposed changes.

Hope this is helpful!

Thanks!

~Timothy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants