ApeWorX / ape-vyper

Vyper compiler plugin for the Ape Framework, using VVM
https://www.apeworx.io/
Apache License 2.0
26 stars 9 forks source link

test: use auto-generated vvm install path #52

Closed ghost closed 2 years ago

ghost commented 2 years ago

What I did

Separated the test suite's vvm installations from the user's, which also ensures the tests start from a clean slate on each run

fixes: #49

How I did it

Added a session scoped, auto-used pytest fixture for setting the install path at startup and cleaning it up at teardown

How to verify it

Clean out your ~/.vvm directory, run the tests, and verify that no Vyper installations are there after the suite completes.

Also should note starting up the test suite may take a tiny bit longer just because it's now downloading the Vyper binaries when it needs them, rather than relying on the real installations that may be present.

Checklist

antazoey commented 2 years ago

I didn't test vyper but I wonder if this same feedback applies: https://github.com/ApeWorX/ape-solidity/pull/59#discussion_r931800437

ghost commented 2 years ago

I didn't test vyper but I wonder if this same feedback applies: ApeWorX/ape-solidity#59 (comment)

@unparalleled-js yeah I think this can apply here too since both plugins work in a pretty similar way (same for their dependencies, py-solc-x and vvm)

I updated in c7cedcc to basically add the same functionality under the env APE_VYPER_USE_SYSTEM_VYPER. Let me know what you think 🙂