ethereum / pytest-ethereum

MIT License
19 stars 12 forks source link

Change glob to use a list of extensions #7

Open fubuloubu opened 5 years ago

fubuloubu commented 5 years ago

https://github.com/ethereum/pytest-ethereum/blob/c3e2ce124b41d5b0767c75630e22e82061f30c54/pytest_ethereum/plugins.py#L23

Change this to have the glob reference a list of known extensions that there are deployers for (e.g. .sol and .vy), so all files are grabbed.

Let the user specify additional extensions, and the deployer for that extension, which may eventually be an external package wrapping up some particular language (e.g. LLL)

I don't necessarily think LLL should be a first class citizen, but it should be relatively easy to integrate if necessary.

fubuloubu commented 5 years ago

https://github.com/ethereum/pytest-ethereum/blob/c3e2ce124b41d5b0767c75630e22e82061f30c54/pytest_ethereum/plugins.py#L90

Simarilly, I'm not sure I agree with having the Deployer specified per-package. I think it should be per-source file if possible, so it accomodates multiple languages/deployers.

fubuloubu commented 5 years ago

In general, I think the pytest-ethereum/pytest_ethereum/plugins.py should be renamed to package.py and handle manifest->package logic and registering deployers for files.

Especially considering that pytest plugin itself needs to be registered: https://github.com/fubuloubu/pytest-ethereum/blob/master/pytest_ethereum/plugin.py