@BNAndras I’m finding the instructions for testing locally need to emphasize more to install unitt v3 first. The local HELP.md file doesn’t even mention it. Can I give you a PR?
Not sure which file that is is but arturo/exercises/shared/.docs/tests.md at 35d809c6c2315722ee9e5d6b800599307b3347cc · exercism/arturo · GitHub is definitely wrong and contradicts arturo/docs/TESTS.md at 35d809c6c2315722ee9e5d6b800599307b3347cc · exercism/arturo · GitHub which is correct in that unitt needs to be preinstalled.
However, I think we can update tester.art to pull down unitt 3.0 if it’s not already installed. I can confirm that tonight since I need to work on a test runner bug reported this last week.
OK, I’ll hold off.
$> import.version:3.0.0 "unitt"
- Querying registry...
- Downloading spec: unitt.pkgr.art ✔
- Downloading sources ✔
- Verifying dependencies...
- Installing package: unitt 3.0.0 ✔
- Loading local package: unitt 3.0.0 ✔
══╡ Index Error ╞═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ <repl> ══
Cannot resolve requested index
Key not found:
filename
For value:
[ :dictionary
values : [ :block
]
]
Hint: Perhaps you meant... _values_ ?
Well, that’s unfortunate. It’s not working in the REPL or tester.art so I’ll ping the dev team to see if this is resolvable. Of course, arturo -p install unitt 3.0.0 works fine, but the idea is to have one less step for students to get set up.
It’s expecting a filename so I can tweak the tester.art (see below) to set args\filename in the current execution scope before importing unitt. That’d load Unitt twice so that’s not great, but the local package discovery is pretty fast so the impact doesn’t seem too significant. I can PR this across the Arturo exercises tomorrow and fix the docs as well. Thanks for the nudge!
args: #[filename: "..."]
import.version:3.0.0 "unitt"
exe: switch "windows" = sys\os
-> "unitt.bat"
-> "unitt"
fullpath: normalize ~"|path\home|/.arturo/packages/bin/|exe|"
code: execute.code.directly fullpath
panic.unstyled.code: code ""
Edit -
execute ~{|sys\binary| -p install unitt 3.0.0} installs Unitt without loading it so the args workaround isn’t needed.