-
Notifications
You must be signed in to change notification settings - Fork 586
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
TypeError in renaming.py #822
Comments
This occurs if @renamed_arguments(y='x')
def f(x):
print(x) So I think we just need to check that the docstring is not- |
I’m surprised this wasn’t caught by the Hypothesis build, because anything we’ve decorated with that should be tested – but I wonder if something inside pytest is throwing away docstrings? |
Okay, patch available, this was an easy spot upon code read. @The-Compiler For your benefit: Because this is an internal function, and only gets applied to strategies defined in the Hypothesis codebase, there’s an implicit assumption that any function it decorates will have a non-empty docstring (as we use them to generate the strategy documentation). I haven’t seen any similar issues reported elsewhere, so it seems likely that pytest CI is stripping docstrings from our strategies. Does that sound plausible? (Also, has this only just started failing CI? 3.20.0 is 6 days old, and I’d expect this to start causing CI failures as soon as it was released. Has something changed in pytest recently?) |
Ah, I can confirm it failed earlier, I just never noticed (I'm currently mostly ignoring mails because of exams going on). This is in a test which sets |
I don't have time to dig into this right now I'm afraid, but it looks like the newest release broke pytest's build:
Travis build: https://travis-ci.org/pytest-dev/pytest/jobs/268491937#L653
Affected code which I don't really understand right now:
https://github.com/HypothesisWorks/hypothesis-python/blob/ea8f3a125adf98d90b7a9de1809f596b41880f8b/src/hypothesis/internal/renaming.py#L42-L54
The text was updated successfully, but these errors were encountered: