-werners-
Esteemed Contributor III

for databricks-connect to run, you do indeed need to setup the connection(s) to your databricks workspace.
Personally I do this with a .databrickscfg file in my home folder (using linux). But you can also pass credentials in the sparksession/databrickssession (https://docs.databricks.com/aws/en/dev-tools/databricks-connect/python, but you are probably aware of this).


The reason why your test script fails but not your main.py is because the test script resides in another location (/tests subdir whereas main.py resides in /src/default_python (or whatever))
So in your test script, the first thing you do is to import the functions written in main.py (from default_python.main import get_taxis, get_spark).
It is possible that this works or not, depending on how your python path is set.
If it does not work, you should add the main.py location to your python path with sys.path.append f.e. (or set it using export PYTHONPATH)).
This has in fact nothing to do with databricks or dab but the way python works.