Skip to content

Add more test cases for --warn-no-return #2276

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
JukkaL opened this issue Oct 18, 2016 · 1 comment
Closed

Add more test cases for --warn-no-return #2276

JukkaL opened this issue Oct 18, 2016 · 1 comment

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Oct 18, 2016

Here are some ideas for additional test cases (as follow-up to #1748):

  • A try statement that returns almost everywhere but can fall through.
  • Empty function with a literal ... body, with or without a docstring.
  • For loops + missing return statements.
  • --warn-no-return and raise or assert False as the last thing in a function.
  • Nested try statements or loops.

(Sorry if some of these are already there.)

@gnprice gnprice changed the title Add more test cases forr --warn-no-return Add more test cases for --warn-no-return Oct 20, 2016
@gvanrossum gvanrossum added this to the 0.4.x milestone Oct 20, 2016
@gvanrossum gvanrossum removed this from the 0.4.x milestone Mar 29, 2017
@msullivan
Copy link
Collaborator

It's been 3 years and it seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants