@@ -46,11 +46,26 @@ suite('Venv Utils test', () => {
46
46
} ) ;
47
47
} ) ;
48
48
49
- test ( 'Toml found with no optional deps ' , async ( ) => {
49
+ test ( 'Toml found with no build system ' , async ( ) => {
50
50
findFilesStub . resolves ( [ ] ) ;
51
51
pathExistsStub . resolves ( true ) ;
52
52
readFileStub . resolves ( '[project]\nname = "spam"\nversion = "2020.0.0"\n' ) ;
53
53
54
+ const actual = await pickPackagesToInstall ( workspace1 ) ;
55
+ assert . isTrue ( showQuickPickStub . notCalled ) ;
56
+ assert . deepStrictEqual ( actual , {
57
+ installType : 'none' ,
58
+ installList : [ ] ,
59
+ } ) ;
60
+ } ) ;
61
+
62
+ test ( 'Toml found with no optional deps' , async ( ) => {
63
+ findFilesStub . resolves ( [ ] ) ;
64
+ pathExistsStub . resolves ( true ) ;
65
+ readFileStub . resolves (
66
+ '[project]\nname = "spam"\nversion = "2020.0.0"\n[build-system]\nrequires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]' ,
67
+ ) ;
68
+
54
69
const actual = await pickPackagesToInstall ( workspace1 ) ;
55
70
assert . isTrue ( showQuickPickStub . notCalled ) ;
56
71
assert . deepStrictEqual ( actual , {
@@ -64,7 +79,7 @@ suite('Venv Utils test', () => {
64
79
findFilesStub . resolves ( [ ] ) ;
65
80
pathExistsStub . resolves ( true ) ;
66
81
readFileStub . resolves (
67
- '[project]\nname = "spam"\nversion = "2020.0.0"\n[project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
82
+ '[project]\nname = "spam"\nversion = "2020.0.0"\n[build-system]\nrequires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]\n[ project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
68
83
) ;
69
84
70
85
showQuickPickStub . resolves ( undefined ) ;
@@ -88,7 +103,7 @@ suite('Venv Utils test', () => {
88
103
findFilesStub . resolves ( [ ] ) ;
89
104
pathExistsStub . resolves ( true ) ;
90
105
readFileStub . resolves (
91
- '[project]\nname = "spam"\nversion = "2020.0.0"\n[project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
106
+ '[project]\nname = "spam"\nversion = "2020.0.0"\n[build-system]\nrequires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]\n[ project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
92
107
) ;
93
108
94
109
showQuickPickStub . resolves ( [ ] ) ;
@@ -116,7 +131,7 @@ suite('Venv Utils test', () => {
116
131
findFilesStub . resolves ( [ ] ) ;
117
132
pathExistsStub . resolves ( true ) ;
118
133
readFileStub . resolves (
119
- '[project]\nname = "spam"\nversion = "2020.0.0"\n[project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
134
+ '[project]\nname = "spam"\nversion = "2020.0.0"\n[build-system]\nrequires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]\n[ project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]' ,
120
135
) ;
121
136
122
137
showQuickPickStub . resolves ( [ { label : 'doc' } ] ) ;
@@ -144,7 +159,7 @@ suite('Venv Utils test', () => {
144
159
findFilesStub . resolves ( [ ] ) ;
145
160
pathExistsStub . resolves ( true ) ;
146
161
readFileStub . resolves (
147
- '[project]\nname = "spam"\nversion = "2020.0.0"\n[project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]\ncov = ["pytest-cov"]' ,
162
+ '[project]\nname = "spam"\nversion = "2020.0.0"\n[build-system]\nrequires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]\n[ project.optional-dependencies]\ntest = ["pytest"]\ndoc = ["sphinx", "furo"]\ncov = ["pytest-cov"]' ,
148
163
) ;
149
164
150
165
showQuickPickStub . resolves ( [ { label : 'test' } , { label : 'cov' } ] ) ;
0 commit comments