File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/test/pythonEnvironments Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,27 @@ suite('Native Python API', () => {
239239 assert . deepEqual ( actual , [ expectedConda1 ] ) ;
240240 } ) ;
241241
242+ test ( 'Ensure no duplication on resolve' , async ( ) => {
243+ mockFinder
244+ . setup ( ( f ) => f . refresh ( ) )
245+ . returns ( ( ) => {
246+ async function * generator ( ) {
247+ yield * [ conda1 ] ;
248+ }
249+ return generator ( ) ;
250+ } )
251+ . verifiable ( typemoq . Times . once ( ) ) ;
252+ mockFinder
253+ . setup ( ( f ) => f . resolve ( typemoq . It . isAny ( ) ) )
254+ . returns ( ( ) => Promise . resolve ( conda ) )
255+ . verifiable ( typemoq . Times . once ( ) ) ;
256+
257+ await api . triggerRefresh ( ) ;
258+ await api . resolveEnv ( '/home/user/.conda/envs/conda_python/python' ) ;
259+ const actual = api . getEnvs ( ) ;
260+ assert . deepEqual ( actual , [ expectedConda1 ] ) ;
261+ } ) ;
262+
242263 test ( 'Conda environment with no python' , async ( ) => {
243264 mockFinder
244265 . setup ( ( f ) => f . refresh ( ) )
You can’t perform that action at this time.
0 commit comments