Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Unable to run tests without (py)spark #2

@cfperez

Description

@cfperez

Tests will not without spark installed.

❯❯❯ ./run_tests.sh                                                                           master ✱ ◼
========================================== test session starts ==========================================
platform linux -- Python 3.6.3, pytest-3.2.3, py-1.4.34, pluggy-0.4.0
rootdir: /home/cperez/repos/sql_magic, inifile: pytest.ini
collected 0 items / 1 errors

================================================ ERRORS =================================================
_________________________________ ERROR collecting tests/test_magic.py __________________________________
tests/test_magic.py:14: in <module>
    from utils import create_spark_conn
tests/utils.py:4: in <module>
    findspark.init()
venv/lib/python3.6/site-packages/findspark.py:134: in init
    py4j = glob(os.path.join(spark_python, 'lib', 'py4j-*.zip'))[0]
E   IndexError: list index out of range
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================== 1 error in 0.63 seconds ========================================
---------------------------------------------------------------------------                                                                                                                               [12/1216]
SystemExit                                Traceback (most recent call last)
~/ans/venv/lib/python3.6/runpy.py in run_module(mod_name, init_globals, run_name, alter_sys)
    203         run_name = mod_name
    204     if alter_sys:
--> 205         return _run_module_code(code, init_globals, run_name, mod_spec)
    206     else:
    207         # Leave the sys module alone

~/ans/venv/lib/python3.6/runpy.py in _run_module_code(code, init_globals, mod_name, mod_spec, pkg_name, script_name)
     94         mod_globals = temp_module.module.__dict__
     95         _run_code(code, mod_globals, init_globals,
---> 96                   mod_name, mod_spec, pkg_name, script_name)
     97     # Copy the globals of the temporary module, as they
     98     # may be cleared when the temporary module goes away

~/ans/venv/lib/python3.6/runpy.py in _run_code(code, run_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
     83                        __package__ = pkg_name,
     84                        __spec__ = mod_spec)
---> 85     exec(code, run_globals)
     86     return run_globals
     87
~/repos/sql_magic/venv/lib/python3.6/site-packages/pytest.py in <module>()
     71     # we trigger the below "else" condition by the following import
     72     import pytest
---> 73     raise SystemExit(pytest.main())
     74 else:
     75

SystemExit: 2
/home/cperez/repos/sql_magic/venv/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2598: UserWarning: Unknown failure executing module: <pytest>
  warn('Unknown failure executing module: <%s>' % mod_name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions