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

brownie test --coverage produces empty json file - Tested with every brownie release since 1.15.2 - With A / B Test #1562

Open
GalloDaSballo opened this issue Jun 21, 2022 · 0 comments

Comments

@GalloDaSballo
Copy link

GalloDaSballo commented Jun 21, 2022

The following issue shows 2 sets of code that are really similar, however, one version of the code works with --coverage as intended, while the second breaks the system for some reason

TL;DR
main -> Coverage works
feat-dust-handling -> Coverage doesn't work and sets up an empty file that looks like this:

{
  "coverage": {},
  "highlights": {
    "branches": {},
    "statements": {}
  },
  "sha1": {}
}

Repository: https://github.com/GalloDaSballo/badger-onchain-rewards

Environment information

  • brownie Version: 1.15 upwards to 1.19.0
  • ganache-cli 6.12.2
  • solc Version: 0.8.12
  • Python Version: 3.9
  • OS: osx/linux/win: Mac

What was wrong?

Running tests with --coverage flag produces empty json object.

I've tried with every brownie version since 1.15.2 and all tests run and pass properly, but coverage .json file is a bunch of empty json data.

Please include information like:

Has been tried by multiple devs, with the code in this repository:
https://github.com/GalloDaSballo/badger-onchain-rewards/tree/feat-dust-handling

Coverage does work for:
https://github.com/GalloDaSballo/badger-onchain-rewards/tree/b0.1

  • what command you ran -> brownie test --coverage

How can it be fixed?

I have no clue but assume that the differences between the two code-bases (which are very minor) should help you shed light into this pretty obscure behaviour

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

No branches or pull requests

1 participant