Skip to content

Commit e802f28

Browse files
authored
Remove temp file and ignore that kind of files (#66)
1 parent 597276d commit e802f28

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,4 @@ ENV/
115115

116116
# Special files
117117
.DS_Store
118+
*.temp

Diff for: CHANGELOG.temp

-13
This file was deleted.

Diff for: test/test_language_server.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
from pylsp.python_lsp import start_io_lang_server, PythonLSPServer
1515

1616
CALL_TIMEOUT = 10
17-
PY2 = sys.version_info[0] == 2
18-
PY3 = sys.version_info[0] == 3
17+
RUNNING_IN_CI = bool(os.environ.get('CI'))
1918

2019

2120
def start_client(client):
@@ -87,8 +86,7 @@ def test_initialize(client_server): # pylint: disable=redefined-outer-name
8786

8887

8988
@flaky(max_runs=10, min_passes=1)
90-
@pytest.mark.skipif(os.name == 'nt' or (sys.platform.startswith('linux') and PY3),
91-
reason='Skipped on win and fails on linux >=3.6')
89+
@pytest.mark.skipif(not sys.platform.startswith('Linux'), reason='Skipped on win and flaky on mac')
9290
def test_exit_with_parent_process_died(client_exited_server): # pylint: disable=redefined-outer-name
9391
# language server should have already exited before responding
9492
lsp_server, mock_process = client_exited_server.client, client_exited_server.process
@@ -104,8 +102,7 @@ def test_exit_with_parent_process_died(client_exited_server): # pylint: disable
104102
assert not client_exited_server.client_thread.is_alive()
105103

106104

107-
@pytest.mark.skipif(sys.platform.startswith('linux') and PY3,
108-
reason='Fails on linux and py3')
105+
@pytest.mark.skipif(sys.platform.startswith('linux'), reason='Fails on linux')
109106
def test_not_exit_without_check_parent_process_flag(client_server): # pylint: disable=redefined-outer-name
110107
response = client_server._endpoint.request('initialize', {
111108
'processId': 1234,
@@ -115,7 +112,7 @@ def test_not_exit_without_check_parent_process_flag(client_server): # pylint: d
115112
assert 'capabilities' in response
116113

117114

118-
@pytest.mark.skipif(bool(os.environ.get('CI')), reason='This test is hanging on CI')
115+
@pytest.mark.skipif(RUNNING_IN_CI, reason='This test is hanging on CI')
119116
def test_missing_message(client_server): # pylint: disable=redefined-outer-name
120117
with pytest.raises(JsonRpcMethodNotFound):
121118
client_server._endpoint.request('unknown_method').result(timeout=CALL_TIMEOUT)

0 commit comments

Comments
 (0)