Closed ckaran closed 8 years ago
Ouch. Yeah, that function was one of those things that I knew was a bad idea when I was writing it but couldn't resist. I'll investigate what's going on.
If you need a workaround right now, moving the lambda body onto the same line as the lambda definition will avoid this bug.
-----Original Message----- From: David R. MacIver [mailto:notifications@github.com] Sent: Tuesday, July 21, 2015 10:00 AM To: DRMacIver/hypothesis Cc: Karan, Cem F CIV USARMY ARL (US) Subject: Re: [hypothesis] Failure within
extract_lambda_source()
AKA, your sins are not forgiven! ;) (#104)Ouch. Yeah, that function was one of those things that I knew was a bad idea when I was writing it but couldn't resist. I'll investigate what's going on.
If you need a workaround right now, moving the lambda body onto the same line as the lambda definition will avoid this bug.
OK, that workaround will work for me.
Thanks for looking into this!
Thanks, Cem Karan
By the way, the source of the change is that 1.8.0 changed repr for flatmap strategies to include the function definition in the description, which uses this extract lambda source function.
I'm actually not totally clear on why repr is being called on the strategy. That doesn't look quite right, but I might be missing something.
This should be fixed in 1.8.4 (just released).
-----Original Message----- From: David R. MacIver [mailto:notifications@github.com] Sent: Tuesday, July 21, 2015 6:42 PM To: DRMacIver/hypothesis hypothesis@noreply.github.com Cc: Karan, Cem F CIV USARMY ARL (US) cem.f.karan.civ@mail.mil Subject: Re: [hypothesis] Failure within
extract_lambda_source()
AKA, your sins are not forgiven! ;) (#104)This should be fixed in 1.8.4 (just released).
Cool, I'll upgrade immediately!
Thanks, Cem Karan
I'm running into a problem with hypothesis, which I've copied at the bottom of this issue. I've created a relatively small py.test file that you can use to test the issue on your system. Similar code used to work for me under earlier versions of hypothesis, but something must have changed...
Anyways, here is the test code, and at the bottom is the output I'm getting
Output: