I'm calling nimble test and my unit test imports unittest2 which I installed via nimble.
D:\timmy>nimble test --verbose
Info: Package cache path C:\Users\dwhall\.nimble\pkgcache
Info: Nimble data file "C:\Users\dwhall\.nimble\nimbledata2.json" has been loaded.
Info: Dependency on nim@>= 2.2.0 already satisfied
Reading official package list
Compiling D:\timmy\tests\test1 (from package timmy) using c backend
Info: compiling nim package using C:\Users\dwhall\AppData\Local\grabnim\current\bin\nim.exe
Executing C:\Users\dwhall\AppData\Local\grabnim\current\bin\nim.exe c --noNimblePath -d:NimblePkgVersion=0.1.0 -r --path:. "D:\timmy\tests\test1"
Nim Output Hint: used config file 'C:\Users\dwhall\AppData\Local\grabnim\current\config\nim.cfg' [Conf]
... Hint: used config file 'C:\Users\dwhall\AppData\Local\grabnim\current\config\config.nims' [Conf]
... Hint: used config file 'D:\timmy\config.nims' [Conf]
... Hint: used config file 'D:\timmy\tests\config.nims' [Conf]
... ..................................................................................................................................
... D:\timmy\src\timmy.nim(3, 8) Error: cannot open file: unittest2
tools.nim(37) doCmd
Error: Execution failed with exit code 1
... Command: C:\Users\dwhall\AppData\Local\grabnim\current\bin\nim.exe c --noNimblePath -d:NimblePkgVersion=0.1.0 -r --path:. "D:\timmy\tests\test1"
Info: Nimble data file "C:\Users\dwhall\.nimble\nimbledata2.json" has been saved.
as you can see, the build fails because --noNimblePath is passed to the nim compiler. I checked the four files mentioned in the Hint lines and I already removed --noNimblePath from nimble.paths.
What other places do I need to check that could inject noNimblePath into the build command?
Depending on the version of nimble you are using features may be worth trying.
From the guide: https://nim-lang.github.io/nimble/create-packages.html#features-experimental