@@ -58,6 +58,10 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
58
58
return folder . object ;
59
59
}
60
60
61
+ function getClientOS ( ) {
62
+ return osType === platform . OSType . Windows ? 'windows' : 'unix' ;
63
+ }
64
+
61
65
function setupIoc ( pythonPath : string , workspaceFolder ?: WorkspaceFolder ) {
62
66
configService = TypeMoq . Mock . ofType < IConfigurationService > ( ) ;
63
67
diagnosticsService = TypeMoq . Mock . ofType < IInvalidPythonPathInDebuggerService > ( ) ;
@@ -160,6 +164,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
160
164
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
161
165
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
162
166
expect ( debugConfig ) . to . have . property ( 'request' , 'launch' ) ;
167
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
163
168
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
164
169
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
165
170
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -188,6 +193,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
188
193
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
189
194
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
190
195
expect ( debugConfig ) . to . have . property ( 'request' , 'launch' ) ;
196
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
191
197
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
192
198
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
193
199
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -215,6 +221,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
215
221
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
216
222
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
217
223
expect ( debugConfig ) . to . have . property ( 'request' , 'launch' ) ;
224
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
218
225
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
219
226
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
220
227
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -239,6 +246,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
239
246
240
247
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
241
248
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
249
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
242
250
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
243
251
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
244
252
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -264,6 +272,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
264
272
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
265
273
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
266
274
expect ( debugConfig ) . to . have . property ( 'request' , 'launch' ) ;
275
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
267
276
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
268
277
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
269
278
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -290,6 +299,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
290
299
expect ( Object . keys ( debugConfig ! ) ) . to . have . lengthOf . above ( 3 ) ;
291
300
expect ( debugConfig ) . to . have . property ( 'type' , 'python' ) ;
292
301
expect ( debugConfig ) . to . have . property ( 'request' , 'launch' ) ;
302
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
293
303
expect ( debugConfig ) . to . not . have . property ( 'pythonPath' ) ;
294
304
expect ( debugConfig ) . to . have . property ( 'python' , pythonPath ) ;
295
305
expect ( debugConfig ) . to . have . property ( 'debugAdapterPython' , pythonPath ) ;
@@ -692,6 +702,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
692
702
} ) ;
693
703
694
704
expect ( debugConfig ) . to . have . property ( 'console' , 'integratedTerminal' ) ;
705
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
695
706
expect ( debugConfig ) . to . have . property ( 'stopOnEntry' , false ) ;
696
707
expect ( debugConfig ) . to . have . property ( 'showReturnValue' , true ) ;
697
708
expect ( debugConfig ) . to . have . property ( 'debugOptions' ) ;
@@ -717,6 +728,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
717
728
} ) ;
718
729
719
730
expect ( debugConfig ) . to . have . property ( 'stopOnEntry' , false ) ;
731
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
720
732
expect ( debugConfig ) . to . have . property ( 'showReturnValue' , true ) ;
721
733
expect ( debugConfig ) . to . have . property ( 'debugOptions' ) ;
722
734
expect ( ( debugConfig as DebugConfiguration ) . debugOptions ) . to . be . deep . equal ( [ ] ) ;
@@ -736,6 +748,7 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
736
748
} ) ;
737
749
738
750
expect ( debugConfig ) . to . have . property ( 'console' , 'integratedTerminal' ) ;
751
+ expect ( debugConfig ) . to . have . property ( 'clientOS' , getClientOS ( ) ) ;
739
752
expect ( debugConfig ) . to . have . property ( 'stopOnEntry' , false ) ;
740
753
expect ( debugConfig ) . to . have . property ( 'showReturnValue' , true ) ;
741
754
expect ( debugConfig ) . to . have . property ( 'redirectOutput' , true ) ;
0 commit comments