ethereum / populus

The Ethereum development framework with the most cute animal pictures
http://populus.readthedocs.org/
321 stars 321 forks source link

Tests not running without project.json #414

Open berndbohmeier opened 6 years ago

berndbohmeier commented 6 years ago

What was wrong?

Without a project.json the tests will not run. You can reproduce that by going into an empty directory and initialize it with populus init and then run the example tests.

FileNotFoundError: No populus project found for testing in /home/bernd/programming/trustlines/contracts/test

Cute Animal Picture

jiffies commented 6 years ago

Same problem as I meet,You can copy 'defaults.v8.config.json' which produce by populus init command and rename it to 'project.json', test will work fine.

veox commented 6 years ago

Do you still have a user-wide config in ~/.populus/?..


EDIT: Can confirm issue present without the above.

youngsoul commented 6 years ago

I too am seeing this issue on MacOS. I do not have a ~/.populus/ directory.

as @jiffies suggests - if you copy the 'defaults.v8.config.json' into your project root and rename to project.json then the tests do run.

b2 commented 6 years ago
$ populus init
Wrote default populus configuration to `./../../.pyenv/versions/3.6.3/envs/api2a/lib/python3.6/site-packages/populus/assets/defaults.v8.config.json`.

api2a is my virtualenv and this is where the write ended up -- seems like that was supposed to the source of project.json, not the destination.

The project.json trick worked for me once I spelled it correctly.

mac Sierra

JanKalin commented 6 years ago

Can confirm the same problem and solution.

introom commented 6 years ago

confirm the same issue and solution.

MarcusJones commented 6 years ago

Also just ran into this while using Conda environment;

Wrote default populus configuration to ``./../anaconda3/lib/python3.6/site-packages/populus/assets/defaults.v8.config.json``.

Rename workaround worked.

voith commented 6 years ago

populus init has a bug. This will be resolved in the next few weeks.

voith commented 6 years ago

populus init has a bug

populus init support was dropped in https://github.com/ethereum/populus/pull/396, However the tests are still expecting config to be present. This will be fixed!

arpi9211 commented 5 years ago

Populus Version: 2.2.0 OS: osx

Problem: FileNotFoundError: No populus project found for testing in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/populus/plugin.py:60

Solution: when we run $ populus init command it will Wrote default populus configuration file at this location /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/populus/assets/defaults.v8.config.json

copy defaults.v8.config.json file and paste it on your project and rename defaults.v8.config.json to project.json file. This solution solved the issue for me