Skip to content

Fail "test/test_server_init.py::test_recursion_error_handling" with KeyError in python-3.14 system #499

Description

@band-a-prend

Describe the bug
The fortls-3.2.2 successfully build in python-3.14 system but when running tests an error arise:

...
test/test_server_init.py::test_recursion_error_handling FAILED                        [161/179]
...
________________________________ test_recursion_error_handling ________________________________

setup_tmp_file = '/var/tmp/portage/dev-util/fortls-3.2.2/temp/tmpj5razep_.f90'

    def test_recursion_error_handling(setup_tmp_file):
        root = Path(setup_tmp_file).parent
        request_string = write_rpc_request(1, "initialize", {"rootPath": str(root)})
        errcode, results = run_request(request_string)
        assert errcode == 0
>       assert results[0]["type"] == Severity.error
               ^^^^^^^^^^^^^^^^^^
E       KeyError: 'type'

errcode    = 0
request_string = ('Content-Length: 114\r\n'
 'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
 '\r\n'
 '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"rootPath":"/var/tmp/portage/dev-util/fortls-3.2.2/temp"}}')
results    = [{'capabilities': {'completionProvider': {'resolveProvider': False,
                                          'triggerCharacters': ['%']},
                   'definitionProvider': True,
                   'documentSymbolProvider': True,
                   'hoverProvider': True,
                   'implementationProvider': True,
                   'referencesProvider': True,
                   'renameProvider': True,
                   'textDocumentSync': 2,
                   'workspaceSymbolProvider': True}}]
root       = PosixPath('/var/tmp/portage/dev-util/fortls-3.2.2/temp')
setup_tmp_file = '/var/tmp/portage/dev-util/fortls-3.2.2/temp/tmpj5razep_.f90'

test/test_server_init.py:32: KeyError

With python 3.13 this test is OK.

Expected behavior
All tests are passed

Setup information (please complete the following information):

  • OS: Gentoo Linux
  • Python Version : 3.14.0
  • fortls Version : 3.2.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions