Page MenuHomeSoftware Heritage

tests: Add hypothesis profile to run tests faster depending on location
ClosedPublic

Authored by ardumont on Nov 12 2018, 2:17 PM.

Details

Summary

Hypothesis allows different settings through profile. In our case,
that would allows us to generate smaller samples on the ci.

This diff provides 2 profiles:

  • dev: larger samples
  • ci: lesser samples

That should be the other way around (largest on ci) but for now, that
will do.

[1] https://hypothesis.readthedocs.io/en/latest/settings.html#settings-profiles

Depends on D647

Test Plan
  • tox
  • tox -e py3-slow
  • make test (old way?)

Diff Detail

Repository
rDSTO Storage manager
Branch
add-content-get-range
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2348
Build 2853: tox-on-jenkinsJenkins
Build 2852: arc lint + arc unit

Event Timeline

Build has FAILED

stacked diff, you cannot build it successfully.

  • Makefile: Adapt makefile to use dev profile
ardumont retitled this revision from tests: Add hypothesis profile to run tests to tests: Add hypothesis profile to run tests faster depending on location.Nov 12 2018, 3:02 PM
douardda requested changes to this revision.EditedNov 13 2018, 10:54 AM

I would rather name these profiles after their nature rather than their usage, ie.

slim/fat or quick/slow instead of dev/ci

This revision now requires changes to proceed.Nov 13 2018, 10:54 AM

I would rather name these profiles after their nature rather than their usage

Yes, sounds right!
(on it)

  • tests: Use fast/slow profile names
douardda added inline comments.
tox.ini
9–11

might be useful to add a py3-slow tox env, I guess.

This revision now requires changes to proceed.Nov 13 2018, 12:06 PM
ardumont added inline comments.
tox.ini
9–11

Good idea.

And this way, i learn tox stuff, cool.

Thanks.

  • tox.ini: Add py3-slow environment to use the slow profile
ardumont added inline comments.
tox.ini
9–11

tox -e py3-slow

  • tox: Define a py3-slow environment

Again (lost one commit here in the rebase workflow)

This revision is now accepted and ready to land.Nov 14 2018, 3:54 PM
This revision was automatically updated to reflect the committed changes.