Skip to content
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

Add interactive mode for unit testing #456

Merged
merged 4 commits into from
Apr 28, 2020
Merged

Add interactive mode for unit testing #456

merged 4 commits into from
Apr 28, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Add the --interactive flag to open a console during testing. Closes #443.

How I did it

  • Use the pytest_exception_interact plugin hook to enter a brownie Console on a failed test, if the --interactive flag is active.
  • Add a variant of _sitebuiltins.Quitter to handle quit and exit commands without closing stdin.
  • Tests and docs

How to verify it

Run tests.

@codecov-io
Copy link

codecov-io commented Apr 28, 2020

Codecov Report

Merging #456 into master will decrease coverage by 0.04%.
The diff coverage is 76.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #456      +/-   ##
==========================================
- Coverage   88.22%   88.17%   -0.05%     
==========================================
  Files          56       56              
  Lines        5911     5939      +28     
  Branches     1300     1304       +4     
==========================================
+ Hits         5215     5237      +22     
- Misses        484      488       +4     
- Partials      212      214       +2     
Impacted Files Coverage Δ
brownie/_cli/test.py 85.00% <ø> (ø)
brownie/test/plugin.py 81.25% <33.33%> (-4.96%) ⬇️
brownie/test/managers/runner.py 88.10% <76.47%> (-1.18%) ⬇️
brownie/_cli/console.py 57.41% <90.00%> (+1.69%) ⬆️

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 f1576f9...bf66dec. Read the comment docs.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 8c63dbf into master Apr 28, 2020
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.

Add a flag to go into the console on test case failure
2 participants