Beispiel #1
0
def test_workspace_folders():
    wf1 = WorkspaceFolder('/ws/f1', 'ws1')
    wf2 = WorkspaceFolder('/ws/f2', 'ws2')

    workspace = Workspace('/ws', workspace_folders=[wf1, wf2])

    assert workspace.folders['/ws/f1'] is wf1
    assert workspace.folders['/ws/f2'] is wf2
Beispiel #2
0
def test_remove_folder(workspace):
    dir_uri = os.path.dirname(DOC_URI)
    dir_name = 'test'
    workspace.add_folder(WorkspaceFolder(dir_uri, dir_name))
    workspace.remove_folder(dir_uri)

    assert dir_uri not in workspace.folders
Beispiel #3
0
def test_add_folder(workspace):
    dir_uri = os.path.dirname(DOC_URI)
    dir_name = 'test'
    workspace.add_folder(WorkspaceFolder(dir_uri, dir_name))
    assert workspace.folders[dir_uri].name == dir_name