But the trouble I am having is that if I actually go to ‘use’ the new PY file outside Rhino, I get errors about being unable to locate the module Rhino. For instance, if I try and do any testing using pytest which references any file that uses “import Rhino” I get Errors:
using the file inside Rhino/GH is all fine - its just if I try and do anything ‘outside’ Rhino that I get these errors. I wonder if anyone can spot where I’m going wrong here in my setup / configuration? If it helps, for this simple example the directory structure just looks like:
am I supposed to be adding anything to the ‘extraPaths’ config? Or should I be setting some other environment variable someplace? Can’t quite seem to get it sorted I’m afraid. Any thoughts are much appreciated!
This is expected. Stubs are not the true implementation and are only there to help with regards to features like autocomplete. You still need to run scripts that reference Rhino and Grasshopper inside of the Rhino process.
Ah - gotcha. Ok thanks. So long as I wasn’t missing something really easy/obvious.
Can I ask: have you ever seen any good solutions for testing in this type of situation? Any examples that I might be able to take a look at?
regardless, thanks for the clarification! @ed.p.may