0

I have a test suite which uses both pytest and hypothesis. I can specify which hypothesis profile should be used, on the command line, like this

pytest --hypothesis-profile some_profile

I am struggling to find how to affect a single hypothesis setting without modifying an existing profile or creating a new one. I would like to be able to do something equivalent to the following imaginary example

pytest --hypothesis-profile some_profile --hypothesis-setting 'use_coverage=False'

Does the hypothesis / pytest combination provide any means of modifying a single hypothes setting, on the command line?

jacg
  • 2,040
  • 1
  • 14
  • 27

1 Answers1

1

Does the hypothesis / pytest combination provide any means of modifying a single hypothes setting, on the command line?

No, it doesn't. There's no major obstacle to doing so though, it's just nobody has implemented it.

DRMacIver
  • 2,259
  • 1
  • 17
  • 17
  • I'm not familiar with the hypothesis source code at all (even though I cloned the repo many moons ago), but would like to contribute. Lack of time, and lack of an obvious entry point have prevented me from doing anything about it so far. While this feature isn't crucial to me, perhaps it could get me over the activation energy bump. Do you think this would be an appropriate problem to attack, as a way of becoming acquainted with the code? – jacg Oct 11 '17 at 14:16
  • Absolutely! I'd recommend opening an issue or an early work in progress pull request to discuss details (both interface and implementation), but we'd definitely be open to adding the feature. – DRMacIver Oct 12 '17 at 16:36