PyTest plugin for testing Smart Contracts for Ethereum blockchain.
Step 1: Install solc
npm install -g solc
or
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
Step 2: Install PyTest
pip install -U pytest
Step 3: Install plugin PyTest-Cobra
pip install pytest-cobra
pytest --cobra Contracts.sol
import_remappings
pytest --cobra Contracts.sol --remapping ["/home/path/dir/"]
Compile your contracts into a package (soon to be ethPM-compliant)
solc --combined-json abi,bin,bin-runtime contracts/ > Contracts.json
Testing Contracts.json
pytest --cobra Contracts.json
Comming soon with Cobra Framework
Go check out the PyTest.