You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is important to be able to load everything from a submodule, I mean something like use asserts * to get every assert command. (Or similarly, use logger *.)
I would rename the assert module to asserts. (It was its original name, too.) And put the run module there with a describing name, like... hm... since Nushell has a run-external command, I would name it run-tests. (Although I like more run external and run tests, but the consistency has more value.)
I think it is important to be able to load everything from a submodule, I mean something like use asserts * to get every assert command. (Or similarly, use logger *.)
i think it's not possible right now with how the modules are nested 🤔
and it was not possible before as everything was in a single module 😮
if you try to use std dirs, that would give
Error: nu::parser::export_not_found
× Export not found.
╭─[entry #1:1:1]
1 │ use std dirs
· ──┬─
· ╰── could not find imports
╰────
They had to be in a single module since bb8949f. I am glad that now they can be again in submodules. (Although they cannot be imported directly.) I agree that in current implementation it is not possible, also I think it would be preferable. Because we are going to have a standard library, not a standard book.
I do not want to expand the scope of this issue, you can create another one for discussing how to organize stdlib submodules.
For now I think we have to agree at least in the name of the test runner command.
They had to be in a single module since bb8949f. I am glad that now they can be again in submodules. (Although they cannot be imported directly.) I agree that in current implementation it is not possible, also I think it would be preferable. Because we are going to have a standard library, not a standard book.
👍
I do not want to expand the scope of this issue, you can create another one for discussing how to organize stdlib submodules.
it's already in the roadmap under "structuring the library" 😉
For now I think we have to agree at least in the name of the test runner command.
run-tests is ok for now 👍
that's a simple mv call and minor find/replace to change this to some other name, so the structure is the main focus 😋
Activity
presidento commentedon Apr 9, 2023
I think it is important to be able to load everything from a submodule, I mean something like
use asserts *to get everyassertcommand. (Or similarly,use logger *.)I would rename the
assertmodule toasserts. (It was its original name, too.) And put therunmodule there with a describing name, like... hm... since Nushell has arun-externalcommand, I would name itrun-tests. (Although I like morerun externalandrun tests, but the consistency has more value.)amtoine commentedon Apr 9, 2023
i think it's not possible right now with how the modules are nested 🤔
and it was not possible before as everything was in a single module 😮
if you try to
use std dirs, that would givefor instance
presidento commentedon Apr 9, 2023
They had to be in a single module since bb8949f. I am glad that now they can be again in submodules. (Although they cannot be imported directly.) I agree that in current implementation it is not possible, also I think it would be preferable. Because we are going to have a standard library, not a standard book.
I do not want to expand the scope of this issue, you can create another one for discussing how to organize stdlib submodules.
For now I think we have to agree at least in the name of the test runner command.
amtoine commentedon Apr 10, 2023
👍
it's already in the roadmap under "structuring the library" 😉
run-testsis ok for now 👍that's a simple
mvcall and minor find/replace to change this to some other name, so the structure is the main focus 😋presidento commentedon Apr 10, 2023
Okay. I'll create a PR after #8776 to move the runner into stdlib, named
run-tests, and I'll update the documentation about testing.amtoine commentedon Apr 10, 2023
coool, looking forward to seing this then 😋
amtoine commentedon Apr 12, 2023
@presidento
do you think that this issue will be addressed once #8850 lands? 😋
if you want to work more on the test framework, i can add a task to the description above and we can let this open 😉
presidento commentedon Apr 12, 2023
Almost, just documentation is needed: nushell/nushell.github.io#868
Then we reach the MVP, so this will be addressed IMHO.
amtoine commentedon Apr 12, 2023
gotcha, that's great 👌
Move unit test runner to standard library (#8850)
amtoine commentedon Jul 21, 2023
i think this has been addressed with the PRs above 👍