Skip to content

Warn on direct import of hypothesis.given#526

Merged
iamdefinitelyahuman merged 1 commit intomasterfrom
warn-hypothesis
May 17, 2020
Merged

Warn on direct import of hypothesis.given#526
iamdefinitelyahuman merged 1 commit intomasterfrom
warn-hypothesis

Conversation

@iamdefinitelyahuman
Copy link
Copy Markdown
Member

What I did

Raise a warning when directly importing hypothesis.

Closes #525

How I did it

When the brownie plugin loads, monkeypatch hypothesis.given with a thin wrapper that raises a warning.

How to verify it

Run tests.

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 17, 2020

Codecov Report

Merging #526 into master will increase coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
+ Coverage   88.47%   88.49%   +0.01%     
==========================================
  Files          56       56              
  Lines        6213     6223      +10     
  Branches     1373     1373              
==========================================
+ Hits         5497     5507      +10     
- Misses        491      492       +1     
+ Partials      225      224       -1     
Impacted Files Coverage Δ
brownie/test/__init__.py 92.30% <75.00%> (-7.70%) ⬇️
brownie/exceptions.py 89.04% <100.00%> (+0.30%) ⬆️
brownie/test/managers/base.py 82.29% <100.00%> (+0.18%) ⬆️
brownie/network/rpc.py 89.92% <0.00%> (+0.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc215f...8ce3e74. Read the comment docs.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 5a22ede into master May 17, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the warn-hypothesis branch May 17, 2020 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise a warning when directly importing hypothesis.given

2 participants