Skip to content

Commit f4bd725

Browse files
committed
Change CS completer tests for Omnisharp server without solution
- Change the test to ensure that the OmniSharp server starts with an empty solution file. - Remove the test that was testing that the case where OmniSharp server should not start when an unambiguous solution file is not found.
1 parent 3a708f9 commit f4bd725

File tree

2 files changed

+7
-27
lines changed

2 files changed

+7
-27
lines changed

ycmd/tests/cs/debug_info_test.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,21 @@ def test_DebugInfo_ServerIsRunning( self, app ):
9595

9696

9797
@SharedYcmd
98-
def test_DebugInfo_ServerIsNotRunning_NoSolution( self, app ):
98+
def test_DebugInfo_ServerIsRunning_NoSolution( self, app ):
9999
request_data = BuildRequest( filetype = 'cs' )
100100
assert_that(
101101
app.post_json( '/debug_info', request_data ).json,
102102
has_entry( 'completer', has_entries( {
103103
'name': 'C#',
104104
'servers': contains_exactly( has_entries( {
105105
'name': 'OmniSharp',
106-
'is_running': False,
106+
'is_running': True,
107107
'executable': instance_of( str ),
108-
'pid': None,
109-
'address': None,
110-
'port': None,
111-
'logfiles': empty()
108+
'pid': instance_of( int ),
109+
'address': instance_of( str ),
110+
'port': instance_of( int ),
111+
'logfiles': contains_exactly( instance_of( str ),
112+
instance_of( str ) )
112113
} ) ),
113114
'items': empty()
114115
} ) )

ycmd/tests/cs/get_completions_test.py

-21
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,3 @@ def test_GetCompletions_PathWithSpace( self, app ):
172172
),
173173
'errors': empty(),
174174
} ) )
175-
176-
177-
@SharedYcmd
178-
def test_GetCompletions_DoesntStartWithAmbiguousMultipleSolutions(
179-
self, app ):
180-
filepath = PathToTestFile( 'testy-multiple-solutions',
181-
'solution-not-named-like-folder',
182-
'testy', 'Program.cs' )
183-
contents = ReadFile( filepath )
184-
event_data = BuildRequest( filepath = filepath,
185-
filetype = 'cs',
186-
contents = contents,
187-
event_name = 'FileReadyToParse' )
188-
189-
assert_that(
190-
calling( app.post_json ).with_args( '/event_notification', event_data ),
191-
raises( AppError, 'Autodetection of solution file failed' ),
192-
"The Omnisharp server started, despite us not being able to find a "
193-
"suitable solution file to feed it. Did you fiddle with the solution "
194-
"finding code in cs_completer.py? Hopefully you've enhanced it: you need "
195-
"to update this test then :)" )

0 commit comments

Comments
 (0)