Closed skyegecko closed 5 years ago
A little bit more searching:
It seems this is caused when there are no spark_options
defined in pytest.ini
. In pytest_spark/__init__.py
the SparkConfigBuilder().initialize()
function is only called if options are defined, otherwise initialize()
is skipped and leads to the later crash.
pytest_spark/fixtures.py
is still a bit strange since there is an attempt to call initialize()
after the raised ValueError, which will never work.
config
file refactor happenedI'm currently working on a PR for this.
@dutchgecko thanks for the report and PR and sorry for the late reply
my fault: line raise ValueError
was added last minute to check some edge cases and I forgot to remove it
fixed in 0.5.2. Please find it on pypi
I get the following stacktrace from
pytest
when trying to call thespark_session
fixture:Taking a quick look at the code, it seems to me that the
raise ValueError
line is completely unnecessary, since the configobject can just be initialized then?