{"id":13790803,"url":"https://github.com/meherett/pytest-solidity","last_synced_at":"2026-02-19T13:00:56.499Z","repository":{"id":39256452,"uuid":"148402613","full_name":"meherett/pytest-solidity","owner":"meherett","description":"PyTest plugin for testing smart contracts for Ethereum blockchain.","archived":false,"fork":false,"pushed_at":"2022-12-08T06:39:34.000Z","size":188,"stargazers_count":27,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T18:26:13.947Z","etag":null,"topics":["cobra","ethereum","ethereum-blockchain","pytest","pytest-cobra","pytest-plugin","python","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pytest-cobra","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meherett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-12T01:25:45.000Z","updated_at":"2025-12-09T13:28:04.000Z","dependencies_parsed_at":"2023-01-24T22:31:12.186Z","dependency_job_id":null,"html_url":"https://github.com/meherett/pytest-solidity","commit_stats":null,"previous_names":["cobraframework/pytest-cobra","meherett/pytest-eth"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/meherett/pytest-solidity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meherett%2Fpytest-solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meherett%2Fpytest-solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meherett%2Fpytest-solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meherett%2Fpytest-solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meherett","download_url":"https://codeload.github.com/meherett/pytest-solidity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meherett%2Fpytest-solidity/sbom","scorecard":{"id":295165,"data":{"date":"2025-08-11","repo":{"name":"github.com/meherett/pytest-solidity","commit":"ea6106269eb38e851bc2b05e34bd40133b66f97f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.0.4 not signed: https://api.github.com/repos/meherett/pytest-solidity/releases/18314744","Warn: release artifact v1.0.1 not signed: https://api.github.com/repos/meherett/pytest-solidity/releases/18034477","Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/meherett/pytest-solidity/releases/17587509","Warn: release artifact v1.0.0a1 not signed: https://api.github.com/repos/meherett/pytest-solidity/releases/17587433","Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/meherett/pytest-solidity/releases/12853808","Warn: release artifact 1.0.4 does not have provenance: https://api.github.com/repos/meherett/pytest-solidity/releases/18314744","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/meherett/pytest-solidity/releases/18034477","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/meherett/pytest-solidity/releases/17587509","Warn: release artifact v1.0.0a1 does not have provenance: https://api.github.com/repos/meherett/pytest-solidity/releases/17587433","Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/meherett/pytest-solidity/releases/12853808"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"32 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: GHSA-3qwc-47jf-5rf7","Warn: Project is vulnerable to: GHSA-rqr8-pxh7-cq3g","Warn: Project is vulnerable to: GHSA-v65g-f3cj-fjp4","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-vqgp-4jgj-5j64","Warn: Project is vulnerable to: GHSA-j225-cvw7-qrx7","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: PYSEC-2020-149 / GHSA-hmv2-79q8-fv6g","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2021-95 / GHSA-8ch4-58qp-g3mp","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T19:19:05.921Z","repository_id":39256452,"created_at":"2025-08-17T19:19:05.921Z","updated_at":"2025-08-17T19:19:05.921Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29614585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cobra","ethereum","ethereum-blockchain","pytest","pytest-cobra","pytest-plugin","python","smart-contracts","solidity"],"created_at":"2024-08-03T22:00:51.433Z","updated_at":"2026-02-19T13:00:56.437Z","avatar_url":"https://github.com/meherett.png","language":"Python","funding_links":[],"categories":["Roadmap"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\t\n  \u003cimg src=\"https://raw.githubusercontent.com/Cobraframework/pytest-cobra/master/pytest-cobra.png\"\u003e\t\t\n\u003c/p\u003e\n\n# PyTest-Cobra ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-cobra.svg?style=for-the-badge)\n\n*PyTest plugin for testing Smart Contracts for Ethereum blockchain.*\n\n[![Build Status](https://travis-ci.com/cobraframework/pytest-cobra.svg?branch=master)](https://travis-ci.com/cobraframework/pytest-cobra)\n![PyPI Version](https://img.shields.io/pypi/v/pytest-cobra.svg?color=blue)\n![GitHub License](https://img.shields.io/github/license/cobraframework/pytest-cobra.svg)\n![Github Date](https://img.shields.io/github/release-date/cobraframework/pytest-cobra.svg?color=black)\n![PyPI Wheel](https://img.shields.io/pypi/wheel/pytest-cobra.svg?color=%2308490e)\n[![Donate with Ethereum](https://en.cryptobadges.io/badge/micro/0xD32AAEDF28A848e21040B6F643861A9077F83106)](https://en.cryptobadges.io/donate/0xD32AAEDF28A848e21040B6F643861A9077F83106)\n\n## Dependency\n\nThis library requires the `solc` executable to be present.\n\nOnly versions `\u003e=0.4.2` are supported and tested though this library may work\nwith other versions.\n\n[solc installation instructions](http://solidity.readthedocs.io/en/latest/installing-solidity.html)\n\nInstall Solidity compiler (solc) using Node Package  Manager(npm)\n```\nnpm install -g solc\n```\nor for Ubuntu(Linux)\n```\nsudo add-apt-repository ppa:ethereum/ethereum\nsudo apt-get update\nsudo apt-get install solc\n```\n\n## Quickstart\nInstallation\n```\npip install pytest-cobra\n```\n\n## Development\nClone the repository and then run\n```\npip install -e . -r requirements.txt\n```\n\n## Usage\n\n#### Execute your test suite\n Example MetaCoin\n [picture](https://github.com/cobraframework/pytest-cobra/blob/master/example/example.png)\n\n```python\n# MetaCoin Testing\n\n# cobra is pytest fixture\ndef test_metacoin(cobra):\n\n    # Getting Contract Factory by name\n    metacoin = cobra.contract('MetaCoin')\n    \n    # Getting Contract Instance of MetaCoin\n    metacoin = metacoin.deploy()\n\n    assert metacoin.getBalance(cobra.accounts[0]) == 10000\n```\n\n### Running test from Solidity file (.sol)\n\n```\npytest --cobra MetaCoin.sol\n```\n\n#### Optional commands\n\n##### Import path remappings\n`solc` provides path aliasing allow you to have more reusable project configurations.\n```\npytest --cobra MetaCoin.sol --import_remappings [\"zeppeling=/my-zeppelin-checkout-folder\"]\n```\n\n##### Allow paths\n```\npytest --cobra MetaCoin.sol --allow_paths \"/home/meheret,/user,/\"\n```\n\n### Running test from compiled Contracts Json file (.json)\n\nCompile your contracts into a package (soon to be ethPM-compliant)\n```\nsolc --combined-json abi,bin,bin-runtime contracts/ \u003e MetaCoin.json\n```\nTesting Contracts.json\n```\npytest --cobra MetaCoin.json\n```\n\n### Running test from Yaml file (.yaml) \n```yaml\ntest:\n  artifact_path: \"./build/contracts/\"\n  test_paths: [\"./tests\"]\n  contracts: [\n    contract: {\n        artifact: \"Contract.json\",\n        links: [\"Contract.json\"]\n    }\n  ]\n```\n\n## Further help\n##### PyTest\nGo check out the [PyTest](http://pytest.org).\n\n## Author ✒️\n\n* **Meheret Tesfaye** - *Initial work* - [Cobra](https://github.com/cobraframework)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeherett%2Fpytest-solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeherett%2Fpytest-solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeherett%2Fpytest-solidity/lists"}