populus icon indicating copy to clipboard operation
populus copied to clipboard

Tests not running without project.json

Open berndbohmeier opened this issue 6 years ago • 10 comments

  • Populus Version: 2.2.0
  • OS: linux

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

berndbohmeier avatar Dec 15 '17 17:12 berndbohmeier

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.

jiffies avatar Dec 17 '17 15:12 jiffies

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


EDIT: Can confirm issue present without the above.

veox avatar Dec 18 '17 14:12 veox

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.

youngsoul avatar Dec 19 '17 03:12 youngsoul

$ 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

b2 avatar Dec 20 '17 20:12 b2

Can confirm the same problem and solution.

JanKalin avatar Dec 21 '17 13:12 JanKalin

confirm the same issue and solution.

introom avatar Jan 25 '18 05:01 introom

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.

MarcusJones avatar Jul 20 '18 06:07 MarcusJones

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

voith avatar Sep 03 '18 16:09 voith

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!

voith avatar Oct 09 '18 20:10 voith

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

arpi9211 avatar Feb 17 '19 07:02 arpi9211