"""
Test compiled module
"""
import os
import platform
import sys
import jedi

from .helpers import cwd_at


@cwd_at('extensions')
def test_compiled():
    if platform.architecture()[0] == '64bit':
        package_name = "compiled%s%s" % sys.version_info[:2]
        if os.path.exists(package_name):
            s = jedi.Script("from %s import compiled; compiled." % package_name)
            assert len(s.completions()) >= 2

"""
Test compiled module
"""
import os
import platform
import sys
import jedi

from .helpers import cwd_at


@cwd_at('extensions')
def test_compiled():
    if platform.architecture()[0] == '64bit':
        package_name = "compiled%s%s" % sys.version_info[:2]
        sys.path.insert(0, os.getcwd())
        if os.path.exists(package_name):
            s = jedi.Script("from %s import compiled; compiled." % package_name)
            assert len(s.completions()) >= 2

Change sys.path for the test to succeed.
Change sys.path for the test to succeed.

Tested locally with a python3 extension module (in
/extensions/compiled33).

Also tested that reverting a75773cf9f7a9fde2a7b2c77b9846b4f0dd5b711 make
the test fail.
