-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pkg.test failing, but runtests.jl is O.K. #7256
Comments
I assume this is on a mac? If so the difference is probably what directory you're in and that mac has a case-insensitive file system by default. |
Gotcha -- so case sensitivity plus that Pkg.test() is changing the directory to prefer to load modules from "test/" over elsewhere. Maybe not undesirable behavior by itself? But people could mock packages/modules other ways, and it's a different directory than users (or at least I) commonly run tests from, so I'd guess it's better to change it rather than restricting test file names. |
The directory-that-tests-are run thing came up a lot in the earlier days of PackageEvaluator. I believe I run them from the root of the package, rather than the test folder, but I initially ran it from the test folder. I basically harassed people to make it work from the root of the package - but I don't feel like people should rely on that. |
I think this can be closed |
I apologize for the delay.I may be missing something, but I'm not sure this should be closed. My understanding is that the naming of files in the If it were consistently caught by common local testing workflows, I think it would be fine to close, but expecting developers to think of the scenario described above each time a test file is added -- that seems like a string of gotchas. |
I'm not sure how this is a Julia problem though? This isn't a problem that people seem to have hit much in 300+ packages |
Maybe I'm just not understanding your perspective: can you give another example of the scenario where a problem occurs? |
I started refactoring/expanding DataFramesIO, one of the formats it deals with is JSON, I tried out As it stands, this will keep slipping through developer testing and Travis and then looks broken to users who are looking to get involved. Maybe it's not really an issue, because I'm sure the developer will reach out if they're stumped when it's reported, but I was just thinking it would come out looking like better design if one official testing mechanism didn't rely on something the other official testing mechanism doesn't catch (when they could be aligned to catch it where possible). I know you've thought a lot about testing and I could be missing something -- just wanted to push a little more in case it was the first time this had come up. |
Its nothing to do with testing though right? Its all about Julia's |
Agreed, but unless the Since everything else uses it and I haven't seen many |
Creating the a tiny package (detailed below),
Pkg.test
returns the following error:Including
runtests.jl
works fine, and so doesPkg.test
if I do EITHER of the following:remove
using JSON
OR rename the unused (in this minimal example)test/json.jl
.(There is no
test/JSON.jl
, onlytest/json.jl
.)Setup:
Pkg.generate("P", "MIT")
Files:
src/P.jl
:src/json.jl
:f() = "I'm here."
test/runtests.jl
:test/json.jl
:The text was updated successfully, but these errors were encountered: