@@ -171,13 +171,11 @@ func TestParseFromStackTrace(t *testing.T) {
171
171
172
172
t .Run ("ExistingDoc" , func (t * testing.T ) {
173
173
currentLang := python .Language
174
- contextData := Setup (currentLang , "main .py" , lib.Position {Line : 2 })
174
+ contextData := Setup (currentLang , "hello .py" , lib.Position {Line : 2 })
175
175
files := fstest.MapFS {
176
- "main.py" : & fstest.MapFile {
177
- Data : []byte (`def main():
178
- a = 1
179
- print(a/0)
180
- ` ),
176
+ "hello.py" : & fstest.MapFile {
177
+ Data : []byte (`a = 1
178
+ print(a/0)` ),
181
179
},
182
180
}
183
181
@@ -188,9 +186,9 @@ func TestParseFromStackTrace(t *testing.T) {
188
186
}
189
187
190
188
// check if the document is parsed
191
- doc , ok := contextData .Documents ["main .py" ]
189
+ doc , ok := contextData .Documents ["hello .py" ]
192
190
if ! ok {
193
- t .Error ("main .py document not found" )
191
+ t .Error ("hello .py document not found" )
194
192
}
195
193
196
194
// check if doc language is same as currentLang
@@ -213,7 +211,7 @@ func TestParseFromStackTrace(t *testing.T) {
213
211
}
214
212
215
213
newFiles := fstest.MapFS {
216
- "main .py" : & fstest.MapFile {
214
+ "hello .py" : & fstest.MapFile {
217
215
Data : []byte (`def main():
218
216
print("Hello, World!")
219
217
` ),
@@ -232,9 +230,9 @@ func TestParseFromStackTrace(t *testing.T) {
232
230
}
233
231
234
232
// check if the document is parsed
235
- doc , ok = contextData .Documents ["main .py" ]
233
+ doc , ok = contextData .Documents ["hello .py" ]
236
234
if ! ok {
237
- t .Error ("main .py document not found" )
235
+ t .Error ("hello .py document not found" )
238
236
}
239
237
240
238
// check if doc language is same as currentLang
0 commit comments