FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vscode-python/src/test/pythonEnvironments/legacyIOC.ts at main · Pythoneryeah/vscode-python · GitHub
Pythoneryeah
/
vscode-python
Public
forked from
microsoft/vscode-python
Notifications
You must be signed in to change notification settings
Fork
1
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
vscode-python
/
src
/
test
/
pythonEnvironments
/
legacyIOC.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (19 loc) · 902 Bytes
Breadcrumbs
vscode-python
/
src
/
test
/
pythonEnvironments
/
legacyIOC.ts
Copy path
File metadata and controls
21 lines (19 loc) · 902 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import
{
instance
,
mock
}
from
'ts-mockito'
;
import
{
IServiceContainer
,
IServiceManager
}
from
'../../client/ioc/types'
;
import
{
IDiscoveryAPI
}
from
'../../client/pythonEnvironments/base/locator'
;
import
{
initializeExternalDependencies
}
from
'../../client/pythonEnvironments/common/externalDependencies'
;
import
{
registerNewDiscoveryForIOC
}
from
'../../client/pythonEnvironments/legacyIOC'
;
/**
* This is here to support old tests.
*
@deprecated
*/
export
async
function
registerForIOC
(
serviceManager
:
IServiceManager
,
serviceContainer
:
IServiceContainer
,
)
:
Promise
<
void
>
{
initializeExternalDependencies
(
serviceContainer
)
;
// The old tests do not need real instances, directly pass in mocks.
registerNewDiscoveryForIOC
(
serviceManager
,
instance
(
mock
<
IDiscoveryAPI
>
(
)
)
)
;
}
Back
|
FazBrowse Home
|
New Git URL