Importing package in test
Hey - not sure if I'm doing something wrong with my env setup but my tests in my
test/
folder can't seem to import from package_name/
.
My folder structure is
And in my test files I write
LSP always redlines package_name
and says unable to locate module
. However everything works just fine from the command line when I run mojo test -I .
How have you solved this?
Link to my repo if you'd like to try it out: https://github.com/mojo-data/arrow.mojoGitHub
GitHub - mojo-data/arrow.mojo: Apache Arrow in Mojo🔥
Apache Arrow in Mojo🔥. Contribute to mojo-data/arrow.mojo development by creating an account on GitHub.
2 Replies
There is an open feature request to at least address the need for the
-I .
import: https://github.com/modularml/mojo/issues/2916 , although the LSP issues wouldn't be covered by that.GitHub
[Feature Request] Add default path . to mojo test · Issue #2916 · m...
Review Mojo's priorities I have read the roadmap and priorities and I believe this request falls within the priorities. What is your request? Add path . as part of the default list of directori...
Thanks!