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

fix: Bug where got assertion error and no-exception to re-raise error [APE-1341] #103

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

antazoey
Copy link
Member

What I did

Fixes: APE-1341

So I am minding my own business, running tests in Ape core and all of a sudden I get random assertions errors in ape-etherscan for now reason... ok.

I really am easily peeved by assertion errors in production code. That should never happen.

So I go and look and comes to find out we are not handling the empty list case at all. So i fix it, and guess what happens? I get something even more dreadful

RuntimeError: No active exception to reraise

what.... why would there ever be an empty raise statement in production code?
So i go and fix that too.

How I did it

How to verify it

Run this test in ape core:

 pytest tests/functional/test_project.py::test_track_deployment_from_unknown_contract_missing_txn_hash

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@linear
Copy link

linear bot commented Sep 13, 2023

APE-1341 "fix: Bug where got assertion error and no-exception to re-raise error" (ApeWorX/ape-etherscan #101)

What I did

So I am minding my own business, running tests in Ape core and all of a sudden I get random assertions errors in ape-etherscan for now reason... ok.

I really am easily peeved by assertion errors in production code. That should never happen.

So I go and look and comes to find out we are not handling the empty list case at all. So i fix it, and guess what happens? I get something even more dreadful

RuntimeError: No active exception to reraise

what.... why would there ever be an empty raise statement in production code?
So i go and fix that too.

How I did it

How to verify it

Run this test in ape core:

 pytest tests/functional/test_project.py::test_track_deployment_from_unknown_contract_missing_txn_hash

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

ApeWorX/ape-etherscan #101 by antazoey on GitHub

via LinearSync

@github-actions
Copy link

This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days.

@github-actions github-actions bot added the stale label Oct 14, 2023
@antazoey
Copy link
Member Author

fixing tests now

@github-actions github-actions bot removed the stale label Oct 19, 2023
@antazoey antazoey merged commit ab9948d into main Oct 20, 2023
24 checks passed
@antazoey antazoey deleted the fix/weird-issues branch October 20, 2023 00:11
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.

1 participant