vyperlang / titanoboa

a vyper interpreter
https://titanoboa.readthedocs.io
Other
247 stars 49 forks source link

fixed tests for macos, and duplicate test file causing issues #258

Open PatrickAlphaC opened 1 month ago

PatrickAlphaC commented 1 month ago

What I did

  1. Fixed https://github.com/vyperlang/titanoboa/issues/256 by skipping tests if on macos. I'm not sure this is the solution, but if it is, then yay, here is the fix.
  2. Their were two files named test_logs which, when running raw pytest results in this error:
import file mismatch:
imported module 'test_logs' has this __file__ attribute:
  /path/code/titanoboa/tests/integration/fork/test_logs.py
which is not the same as the test file we want to collect:
  /path/code/titanoboa/tests/unitary/test_logs.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules

So we just renamed one of them.

How I did it

How to verify it

  1. get on a macos and run: pytest tests/unitary/ and tests now pass
  2. Run pytest tests/unitary/test_logs.py tests/integration/fork/test_logs_weth.py and tests will pass the issue they ran into before. On the master branch, if you run pytest tests/unitary/test_logs.py tests/integration/fork/test_logs.py they will fail.

Description for the changelog

Cute Animal Picture

image

charles-cooper commented 1 month ago

let's not do the skipif thing, that's just a band-aid.

for the file conflict, i think the appropriate fix is to add an __init__.py file to each of the directories