# Path: tests/helpers.py
# def pytest_funcarg__project(request):
#     for crap_module in ('toimport', 'package'):
#         if crap_module in sys.modules:
#             del sys.modules[crap_module]
# 
#     p = Project('.')
#     p.create_module = create_module.__get__(p, Project)
#     p.create_scope = create_scope.__get__(p, Project)
#     p.set_root = set_project_root.__get__(p, Project)
#     return p
# 
# def do_assist(project, source, filename=None):
#     filename = filename or 'test.py'
#     source, pos = get_source_and_pos(source)
#     return assist(project, source, pos, filename)[1]
# 
# def get_source_and_pos(source):
#     source = cleantabs(source)
#     pos = source.find('|')
#     if pos < 0:
#         pos = len(source)
# 
#     return source.replace('|', ''), pos


from .helpers import pytest_funcarg__project, do_assist, get_source_and_pos

def test_eval_of_os_path_abspath(project):
    result = do_assist(project, '''
        from os.path import abspath
        abspath('').''')

    assert 'lower' in result

def test_assist_for_gtk_object_attributes(project):

# Path: tests/helpers.py
# def pytest_funcarg__project(request):
#     for crap_module in ('toimport', 'package'):
#         if crap_module in sys.modules:
#             del sys.modules[crap_module]
# 
#     p = Project('.')
#     p.create_module = create_module.__get__(p, Project)
#     p.create_scope = create_scope.__get__(p, Project)
#     p.set_root = set_project_root.__get__(p, Project)
#     return p
# 
# def do_assist(project, source, filename=None):
#     filename = filename or 'test.py'
#     source, pos = get_source_and_pos(source)
#     return assist(project, source, pos, filename)[1]
# 
# def get_source_and_pos(source):
#     source = cleantabs(source)
#     pos = source.find('|')
#     if pos < 0:
#         pos = len(source)
# 
#     return source.replace('|', ''), pos


# Path: tests/test_irl_cases.py
from .helpers import pytest_funcarg__project, do_assist, get_source_and_pos


def test_eval_of_os_path_abspath(project):
    result = do_assist(project, '''
        from os.path import abspath
        abspath('').''')

    assert 'lower' in result

def test_assist_for_gtk_object_attributes(project):

    result = do_assist(project, '''