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: "import file mismatch" #141

Open
eliotstock opened this issue Aug 16, 2021 · 0 comments
Open

brownie test: "import file mismatch" #141

eliotstock opened this issue Aug 16, 2021 · 0 comments

Comments

@eliotstock
Copy link

Environment information

  • curve-contract branch/commit: master/latest
  • brownie Version: 1.14.5
  • ganache-cli Version: 6.12.2
  • OS: linux

What was wrong?

Please include information like:

  • what you are trying to accomplish: run tests
  • which command(s) you ran: brownie test
  • the code that caused the failure:
    /tests/pools/common/unitary/test_exchange_reverts.py
    /tests/pools/eth/test_exchange_reverts.py
  • output:
    (curve-venv) $brownie test
    Brownie v1.14.5 - Python development framework for Ethereum

Compiling contracts...
Solc version: 0.5.17
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
Generating build data...

  • AaveLendingPoolMock
  • IERC20
  • aToken
  • ATokenMock
  • IERC20
  • SafeMath

================================================================================================================================== test session starts ===================================================================================================================================
platform linux -- Python 3.9.5, pytest-6.0.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/e/r/[removed]/curve-venv/curve-contract
plugins: eth-brownie-1.14.5, xdist-1.34.0, forked-1.3.0, hypothesis-5.41.3, web3-5.11.1
collected 14564 items / 2 errors / 14562 selected

Launching 'ganache-cli --port 8545 --gasLimit 12000000 --accounts 10 --hardfork istanbul --mnemonic brownie --defaultBalanceEther 10000'...

========================================================================================================================================= ERRORS =========================================================================================================================================
_______________________________________________________________________________________________________________ ERROR collecting tests/pools/eth/test_exchange_reverts.py ________________________________________________________________________________________________________________
import file mismatch:
imported module 'test_exchange_reverts' has this file attribute:
/home/e/r/[removed]/curve-venv/curve-contract/tests/pools/common/unitary/test_exchange_reverts.py
which is not the same as the test file we want to collect:
/home/e/r/[removed]/curve-venv/curve-contract/tests/pools/eth/test_exchange_reverts.py
HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules
__________________________________________________________________________________________________ ERROR collecting tests/zaps/meta/integration/test_remove_liquidity_imbalance_zap.py ___________________________________________________________________________________________________
import file mismatch:
imported module 'test_remove_liquidity_imbalance_zap' has this file attribute:
/home/e/r/[removed]/curve-venv/curve-contract/tests/zaps/common/test_remove_liquidity_imbalance_zap.py
which is not the same as the test file we want to collect:
/home/e/r/[removed]/curve-venv/curve-contract/tests/zaps/meta/integration/test_remove_liquidity_imbalance_zap.py
HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules

How can it be fixed?

No idea.

I'm using a venv, as instructed.

Note that I'm using Python 3.9.5 and you currently require 3.6 to 3.8, but this doesn't seem like a Python issue.

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