Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Adds tests; Stale #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Adds tests; Stale #3

wants to merge 7 commits into from

Conversation

ksdme
Copy link
Member

@ksdme ksdme commented Jun 5, 2018

No description provided.

@ksdme
Copy link
Member Author

ksdme commented Jun 5, 2018

@jayvdb Please enable Codecov.

.gitignore Outdated
.vscode/

# pytest cache
.pytest_cache/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

covered by #4

# - cd ./vscode-client
# - npm test
# - cd - > /dev/null
- py.test --cov-report term --cov=coalals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not using behave?

That hasnt been discussed anywhere publicly that I have seen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests previously were fragmented between behave and unittest and the current changes required changes to most of those tests. So, the few reusable tests have been rewritten too in pytest and pytest now covers all the codebase.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a discussion privately. @ksdme and me thought that he is familiar with unittest which is heavily used in coala/coala. Thus we decided to unify the tool. Sorry that we do not open an issue to keep track of the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current changes required changes to most of those tests.

ok, I'll have a closer look at the current changes to better understand why.

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

py.test --cov-report term --cov=coalals
============================= test session starts ==============================
platform linux -- Python 3.4.6, pytest-3.6.1, py-1.5.3, pluggy-0.6.0
rootdir: /home/travis/build/coala/coala-ls, inifile:
plugins: cov-2.5.1
collected 68 items                                                             

tests/tests_coalals/test_concurrency__JobTracker.py .........            [ 13%]
tests/tests_coalals/test_concurrency__TrackedProcessPool.py ...          [ 17%]
tests/tests_coalals/test_interface.py .F.FFFF.                           [ 29%]
tests/tests_coalals/test_langserver.py ....F.F...F...FF                  [ 52%]
tests/tests_coalals/test_main.py ..                                      [ 55%]
tests/tests_coalals/test_results.py ....                                 [ 61%]
tests/tests_coalals/tests_utils/test_entities.py ..                      [ 64%]
tests/tests_coalals/tests_utils/test_files__FileProxy.py .EE.FE..        [ 76%]
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py .FFFF.FFF    [ 89%]
tests/tests_coalals/tests_utils/test_files__UriUtils.py EEEEE            [ 97%]
tests/tests_coalals/tests_utils/test_wrappers.py ..                      [100%]

==================================== ERRORS ====================================
____________________ ERROR at setup of test_fileproxy_init _____________________

    @pytest.fixture
    def empty_fileproxy():
>       random_path = get_random_path('1')

tests/tests_coalals/tests_utils/test_files__FileProxy.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________ ERROR at setup of test_fileproxy_str _____________________

    @pytest.fixture
    def empty_fileproxy():
>       random_path = get_random_path('1')

tests/tests_coalals/tests_utils/test_files__FileProxy.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
____________________ ERROR at setup of test_fileproxy_close ____________________

    @pytest.fixture
    def empty_fileproxy():
>       random_path = get_random_path('1')

tests/tests_coalals/tests_utils/test_files__FileProxy.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
________________ ERROR at setup of test_path_from_uri_with_uri _________________

    @pytest.fixture
    def valid_uri():
>       path = get_random_path('1', True)

tests/tests_coalals/tests_utils/test_files__UriUtils.py:10: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
________________ ERROR at setup of test_path_from_uri_with_path ________________

    @pytest.fixture
    def valid_path():
>       return get_random_path('1')

tests/tests_coalals/tests_utils/test_files__UriUtils.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_________________ ERROR at setup of test_dir_from_uri_with_uri _________________

    @pytest.fixture
    def valid_uri():
>       path = get_random_path('1', True)

tests/tests_coalals/tests_utils/test_files__UriUtils.py:10: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
________________ ERROR at setup of test_dir_from_uri_with_path _________________

    @pytest.fixture
    def valid_path():
>       return get_random_path('1')

tests/tests_coalals/tests_utils/test_files__UriUtils.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
______________________ ERROR at setup of test_file_to_uri ______________________

    @pytest.fixture
    def valid_path():
>       return get_random_path('1')

tests/tests_coalals/tests_utils/test_files__UriUtils.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
=================================== FAILURES ===================================
____________________ test_coalawrapper_analyse_missing_file ____________________

coala = <coalals.interface.coalaWrapper object at 0x7f75414e7c50>

    def test_coalawrapper_analyse_missing_file(coala):
        coala = coala()
    
>       random_path = get_random_path('1')

tests/tests_coalals/test_interface.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
___________________ test_coalawrapper_p_analyse_missing_file ___________________

coala = <coalals.interface.coalaWrapper object at 0x7f75414fac50>

    def test_coalawrapper_p_analyse_missing_file(coala):
        coala = coala()
    
>       random_path = get_random_path('2')

tests/tests_coalals/test_interface.py:95: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '2', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
__________________ test_coalawrapper_p_analyse_file_fail_job ___________________

coala = <coalals.interface.coalaWrapper object at 0x7f754028d6a0>

    def test_coalawrapper_p_analyse_file_fail_job(coala):
        coala = coala()
        one, two = DummyFuture(), DummyFuture()
    
>       random_path = get_random_path('3')

tests/tests_coalals/test_interface.py:109: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '3', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
__________________ test_coalawrapper_run_coala_patched_op[1] ___________________

coala = <coalals.interface.coalaWrapper object at 0x7f75414fd470>, retval = 1

    @pytest.mark.parametrize('retval', (1, -1))
    def test_coalawrapper_run_coala_patched_op(coala, retval):
        coala = coala(True, retval)
    
>       random_path = get_random_path('4')

tests/tests_coalals/test_interface.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '4', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
__________________ test_coalawrapper_run_coala_patched_op[-1] __________________

coala = <coalals.interface.coalaWrapper object at 0x7f7540290d68>, retval = -1

    @pytest.mark.parametrize('retval', (1, -1))
    def test_coalawrapper_run_coala_patched_op(coala, retval):
        coala = coala(True, retval)
    
>       random_path = get_random_path('4')

tests/tests_coalals/test_interface.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '4', as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
____________________ test_did_change_proxy_replace_new_file ____________________

file_langserver = (<_io.BufferedRandom name=13>, <coalals.langserver.LangServer object at 0x7f75414fa898>)

    def test_did_change_proxy_replace_new_file(file_langserver):
        file, langserver = file_langserver
>       random_path = get_random_path('1', True)

tests/tests_coalals/test_langserver.py:137: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
__________________ test_did_change_proxy_replace_missing_file __________________

file_langserver = (<_io.BufferedRandom name=14>, <coalals.langserver.LangServer object at 0x7f75402b7668>)

    def test_did_change_proxy_replace_missing_file(file_langserver):
        file, langserver = file_langserver
>       random_path = get_random_path('2', True)

tests/tests_coalals/test_langserver.py:213: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '2', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
____________________ test_langserver_did_save_missing_proxy ____________________

file_langserver = (<_io.BufferedRandom name=12>, <coalals.langserver.LangServer object at 0x7f75402c44e0>)
verify_publish_respone = <function verify_publish_respone.<locals>._internal at 0x7f75414eaea0>

    def test_langserver_did_save_missing_proxy(file_langserver,
                                               verify_publish_respone):
        file, langserver = file_langserver
>       random_path = get_random_path('3', True)

tests/tests_coalals/test_langserver.py:346: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '3', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________ test_langserver_did_close[one-True] ______________________

file_langserver = (<_io.BufferedRandom name=13>, <coalals.langserver.LangServer object at 0x7f7540275828>)
name = 'one', add = True

    @pytest.mark.parametrize('name,add', [
        ('one', True),
        ('two', False)])
    def test_langserver_did_close(file_langserver, name, add):
        _, langserver = file_langserver
>       random_path = get_random_path(name, True)

tests/tests_coalals/test_langserver.py:431: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 'one', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________ test_langserver_did_close[two-False] _____________________

file_langserver = (<_io.BufferedRandom name=16>, <coalals.langserver.LangServer object at 0x7f754028dd68>)
name = 'two', add = False

    @pytest.mark.parametrize('name,add', [
        ('one', True),
        ('two', False)])
    def test_langserver_did_close(file_langserver, name, add):
        _, langserver = file_langserver
>       random_path = get_random_path(name, True)

tests/tests_coalals/test_langserver.py:431: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 'two', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_______________________ test_file_from_name_missing_file _______________________

    def test_file_from_name_missing_file():
>       random_path = get_random_path('5', py=False)

tests/tests_coalals/tests_utils/test_files__FileProxy.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '5', as_obj = False, py = False

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
______________________________ test_proxymap_add _______________________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f7540275080>
random_fileproxy = <function random_fileproxy.<locals>._internal at 0x7f7541514e18>

    def test_proxymap_add(empty_proxymap, random_fileproxy):
        assert empty_proxymap.add(123) is False
        assert empty_proxymap.add('coala') is False
    
>       proxy_one = random_fileproxy()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:21: in _internal
    random = random_filename()
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 2060, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________________ test_proxymap_remove _____________________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f7540214438>
random_fileproxy = <function random_fileproxy.<locals>._internal at 0x7f7541514f28>
random_filename = <function random_filename.<locals>._internal at 0x7f7541514bf8>

    def test_proxymap_remove(empty_proxymap, random_fileproxy, random_filename):
>       random = random_fileproxy()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:52: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:21: in _internal
    random = random_filename()
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 7438, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
______________________________ test_proxymap_get _______________________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f754151d940>
random_fileproxy = <function random_fileproxy.<locals>._internal at 0x7f754027d048>
random_filename = <function random_filename.<locals>._internal at 0x7f75415149d8>

    def test_proxymap_get(empty_proxymap, random_fileproxy, random_filename):
>       search_for = random_filename()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 8295, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_________________________ test_proxymap_resolve_finds __________________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f75402c4668>
random_fileproxy = <function random_fileproxy.<locals>._internal at 0x7f754027d158>

    def test_proxymap_resolve_finds(empty_proxymap, random_fileproxy):
>       random = random_fileproxy()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:73: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:21: in _internal
    random = random_filename()
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 2838, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________ test_proxymap_resolve_not_finds_hard _____________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f754029de48>
random_filename = <function random_filename.<locals>._internal at 0x7f754027d268>

    def test_proxymap_resolve_not_finds_hard(empty_proxymap, random_filename):
>       filename = random_filename()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 7537, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
____________________ test_proxymap_resolve_create_soft_err _____________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f7540256be0>

    def test_proxymap_resolve_create_soft_err(empty_proxymap):
>       random_path = get_random_path('1', True)

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:94: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = '1', as_obj = True, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError
_____________________ test_proxymap_resolve_not_finds_soft _____________________

empty_proxymap = <coalals.utils.files.FileProxyMap object at 0x7f75402761d0>
random_fileproxy = <function random_fileproxy.<locals>._internal at 0x7f7541514a60>

    def test_proxymap_resolve_not_finds_soft(empty_proxymap, random_fileproxy):
>       random = random_fileproxy()

tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:21: in _internal
    random = random_filename()
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py:14: in _internal
    return get_random_path(rand_no)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

suffix = 7395, as_obj = False, py = True

    def get_random_path(suffix, as_obj=False, py=True):
        ext = 'py' if py else 'txt'
        filename = 'coala-rox-{}.{}'.format(suffix, ext)
>       path = Path.home().joinpath('coala-x', filename)
E       AttributeError: type object 'Path' has no attribute 'home'

tests/tests_coalals/helpers/utils.py:7: AttributeError

----------- coverage: platform linux, python 3.4.6-final-0 -----------
Name                            Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------
coalals/__init__.py                 0      0      0      0   100%
coalals/coaconfig/__init__.py       0      0      0      0   100%
coalals/concurrency.py             52      0     16      0   100%
coalals/interface.py               44      4     10      2    85%
coalals/langserver.py              88      6     14      2    92%
coalals/main.py                    28      0      0      0   100%
coalals/results.py                 33      0      8      0   100%
coalals/utils/__init__.py           0      0      0      0   100%
coalals/utils/entities.py           4      0      0      0   100%
coalals/utils/files.py             83     17     22      2    76%
coalals/utils/log.py                2      0      0      0   100%
coalals/utils/wrappers.py          10      0      0      0   100%
-----------------------------------------------------------------
TOTAL                             344     27     70      6    90%

================ 18 failed, 42 passed, 8 error in 79.18 seconds ================

@ksdme ksdme force-pushed the gsoc-phase-1-tests branch 2 times, most recently from a787b7f to f5a78ce Compare June 6, 2018 05:15
@TravisBuddy
Copy link

Hey @ksdme,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because something unrelated to the tests, like a problem a dependency or the build process itself.

ksdme added 6 commits June 7, 2018 15:56
This updates the project with some fixes,
improves the code style and adds generalization.
The code omission and coverage requirements
are updated.
The existsing fragmented tests are dropped
in favour of pytest tests.
The entire module now has a standard
test suite in pytest with full coverage.
@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

py.test --cov-report term --cov=coalals
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.3.0, py-1.5.2, pluggy-0.6.0
rootdir: /home/travis/build/coala/coala-ls, inifile:
plugins: cov-2.5.1
collected 68 items                                                             

tests/tests_coalals/test_concurrency__JobTracker.py .........            [ 13%]
tests/tests_coalals/test_concurrency__TrackedProcessPool.py FFF          [ 17%]
tests/tests_coalals/test_interface.py FFFFFFFF                           [ 29%]
tests/tests_coalals/test_langserver.py EEEEEEEEEEEFFFEE                  [ 52%]
tests/tests_coalals/test_main.py F.                                      [ 55%]
tests/tests_coalals/test_results.py ....                                 [ 61%]
tests/tests_coalals/tests_utils/test_entities.py ..                      [ 64%]
tests/tests_coalals/tests_utils/test_files__FileProxy.py ........        [ 76%]
tests/tests_coalals/tests_utils/test_files__FileProxyMap.py .........    [ 89%]
tests/tests_coalals/tests_utils/test_files__UriUtils.py .....            [ 97%]
tests/tests_coalals/tests_utils/test_wrappers.py ..                      [100%]

----------- coverage: platform linux, python 3.6.3-final-0 -----------
Name                            Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------
coalals/__init__.py                 0      0      0      0   100%
coalals/coaconfig/__init__.py       0      0      0      0   100%
coalals/concurrency.py             52      6     16      0    88%
coalals/interface.py               44     26     10      0    33%
coalals/langserver.py              88     60     14      0    27%
coalals/main.py                    28     13      0      0    54%
coalals/results.py                 33      0      8      0   100%
coalals/utils/__init__.py           0      0      0      0   100%
coalals/utils/entities.py           4      0      0      0   100%
coalals/utils/files.py             83      0     22      0   100%
coalals/utils/log.py                2      0      0      0   100%
coalals/utils/wrappers.py          10      0      0      0   100%
-----------------------------------------------------------------
TOTAL                             344    105     70      0    68%


==================================== ERRORS ====================================
_______________ ERROR at setup of test_server_init_with_rootPath _______________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e807f0>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
_______________ ERROR at setup of test_server_init_with_rootUri ________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e89e10>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
___________________ ERROR at setup of test_send_diagnostics ____________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634ef29e8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
__________________ ERROR at setup of test_lanserver_shutdown ___________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634ea5ba8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
___________ ERROR at setup of test_did_change_proxy_replace_new_file ___________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e803c8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
__________ ERROR at setup of test_did_change_proxy_replace_open_file ___________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e89630>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
_________ ERROR at setup of test_did_change_proxy_replace_missing_file _________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e927b8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
________________ ERROR at setup of test_did_change_proxy_update ________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634deedd8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
__________________ ERROR at setup of test_langserver_did_open __________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634ec7198>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
__________________ ERROR at setup of test_langserver_did_save __________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e90908>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
___________ ERROR at setup of test_langserver_did_save_missing_proxy ___________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e923c8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
____________ ERROR at setup of test_langserver_did_close[one-True] _____________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634da27b8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
____________ ERROR at setup of test_langserver_did_close[two-False] ____________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e802e8>

    @pytest.fixture
    def file_langserver(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:16: AttributeError
=================================== FAILURES ===================================
____________________________ test_trackedpool_init _____________________________

trackedpool = <function trackedpool.<locals>._trackedpool at 0x7fd634e72840>

    def test_trackedpool_init(trackedpool):
>       trackedpool = trackedpool()

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

max_jobs = 1, max_workers = 1

    def _trackedpool(max_jobs=1, max_workers=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:10: AttributeError
________________________________ test_shutdown _________________________________

trackedpool = <function trackedpool.<locals>._trackedpool at 0x7fd634eb7400>

    def test_shutdown(trackedpool):
>       trackedpool = trackedpool()

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

max_jobs = 1, max_workers = 1

    def _trackedpool(max_jobs=1, max_workers=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:10: AttributeError
________________________________ test_exec_func ________________________________

trackedpool = <function trackedpool.<locals>._trackedpool at 0x7fd634e72950>

    def test_exec_func(trackedpool):
>       trackedpool = trackedpool(2)

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:31: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

max_jobs = 2, max_workers = 1

    def _trackedpool(max_jobs=1, max_workers=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_concurrency__TrackedProcessPool.py:10: AttributeError
________________________ test_coalawrapper_analyse_file ________________________

coala = <function coala.<locals>._internal at 0x7fd634e6a048>
sample_proxymap = <helpers.dummies.DummyFileProxyMap object at 0x7fd634ea5ac8>

    def test_coalawrapper_analyse_file(coala, sample_proxymap):
>       coala = coala()

tests/tests_coalals/test_interface.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
____________________ test_coalawrapper_analyse_missing_file ____________________

coala = <function coala.<locals>._internal at 0x7fd634e727b8>

    def test_coalawrapper_analyse_missing_file(coala):
>       coala = coala()

tests/tests_coalals/test_interface.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
_______________________ test_coalawrapper_p_analyse_file _______________________

coala = <function coala.<locals>._internal at 0x7fd634e6a268>
sample_proxymap = <helpers.dummies.DummyFileProxyMap object at 0x7fd634e81be0>

    def test_coalawrapper_p_analyse_file(coala, sample_proxymap):
>       coala = coala()

tests/tests_coalals/test_interface.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
___________________ test_coalawrapper_p_analyse_missing_file ___________________

coala = <function coala.<locals>._internal at 0x7fd634e6a2f0>

    def test_coalawrapper_p_analyse_missing_file(coala):
>       coala = coala()

tests/tests_coalals/test_interface.py:93: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
__________________ test_coalawrapper_p_analyse_file_fail_job ___________________

coala = <function coala.<locals>._internal at 0x7fd634e6a488>

    def test_coalawrapper_p_analyse_file_fail_job(coala):
>       coala = coala()

tests/tests_coalals/test_interface.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
__________________ test_coalawrapper_run_coala_patched_op[1] ___________________

coala = <function coala.<locals>._internal at 0x7fd634e6a620>, retval = 1

    @pytest.mark.parametrize('retval', (1, -1))
    def test_coalawrapper_run_coala_patched_op(coala, retval):
>       coala = coala(True, retval)

tests/tests_coalals/test_interface.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = True, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
__________________ test_coalawrapper_run_coala_patched_op[-1] __________________

coala = <function coala.<locals>._internal at 0x7fd634e6a7b8>, retval = -1

    @pytest.mark.parametrize('retval', (1, -1))
    def test_coalawrapper_run_coala_patched_op(coala, retval):
>       coala = coala(True, retval)

tests/tests_coalals/test_interface.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = True, patched_ret_val = -1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
___________________________ test_coalawrapper_close ____________________________

coala = <function coala.<locals>._internal at 0x7fd634e6a598>

    def test_coalawrapper_close(coala):
>       coala = coala()

tests/tests_coalals/test_interface.py:135: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

patch_run_coala = False, patched_ret_val = 1

    def _internal(patch_run_coala=False, patched_ret_val=1):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_interface.py:25: AttributeError
____ test_langserver_did_open_future_cancelled[DummyAlwaysCancelledFuture] _____

future_class = <class 'helpers.dummies.DummyAlwaysCancelledFuture'>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e8fe80>
verify_publish_respone = <function verify_publish_respone.<locals>._internal at 0x7fd634e6a268>

    @pytest.mark.parametrize('future_class', [
        DummyAlwaysCancelledFuture,
        DummyAlwaysExceptionFuture])
    def test_langserver_did_open_future_cancelled(future_class,
                                                  monkeypatch,
                                                  verify_publish_respone):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:369: AttributeError
____ test_langserver_did_open_future_cancelled[DummyAlwaysExceptionFuture] _____

future_class = <class 'helpers.dummies.DummyAlwaysExceptionFuture'>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634ef27b8>
verify_publish_respone = <function verify_publish_respone.<locals>._internal at 0x7fd634e6aa60>

    @pytest.mark.parametrize('future_class', [
        DummyAlwaysCancelledFuture,
        DummyAlwaysExceptionFuture])
    def test_langserver_did_open_future_cancelled(future_class,
                                                  monkeypatch,
                                                  verify_publish_respone):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:369: AttributeError
_____________________ test_langserver_did_save_failed_job ______________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634e90048>

    def test_langserver_did_save_failed_job(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_langserver.py:400: AttributeError
____________________________ test_start_tcp_server _____________________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd634ed2ac8>

    def test_start_tcp_server(monkeypatch):
>       with monkeypatch.context() as patch:
E       AttributeError: 'MonkeyPatch' object has no attribute 'context'

tests/tests_coalals/test_main.py:10: AttributeError
================ 15 failed, 40 passed, 13 error in 2.72 seconds ================

This updates the test requirements and
travis configuration.
@gaocegege
Copy link
Member

Is the PR still WIP?

@gaocegege
Copy link
Member

I think we could close the issue since we decided to add corresponding test cases in #2

@ksdme
Copy link
Member Author

ksdme commented Jun 10, 2018

Yes, I have suggested than on gitter.

@ksdme
Copy link
Member Author

ksdme commented Jun 10, 2018

@jayvdb Can I close this PR?

@ksdme ksdme changed the title [WIP] Adds tests Adds tests; Stale Aug 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants