Skip to content

Commit de60a4e

Browse files
committed
fix: update filename for TestParseFromStackTrace/ExistingDoc
1 parent bbd18c4 commit de60a4e

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

errgoengine_test.go

+9-11
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,11 @@ func TestParseFromStackTrace(t *testing.T) {
171171

172172
t.Run("ExistingDoc", func(t *testing.T) {
173173
currentLang := python.Language
174-
contextData := Setup(currentLang, "main.py", lib.Position{Line: 2})
174+
contextData := Setup(currentLang, "hello.py", lib.Position{Line: 2})
175175
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)`),
181179
},
182180
}
183181

@@ -188,9 +186,9 @@ func TestParseFromStackTrace(t *testing.T) {
188186
}
189187

190188
// check if the document is parsed
191-
doc, ok := contextData.Documents["main.py"]
189+
doc, ok := contextData.Documents["hello.py"]
192190
if !ok {
193-
t.Error("main.py document not found")
191+
t.Error("hello.py document not found")
194192
}
195193

196194
// check if doc language is same as currentLang
@@ -213,7 +211,7 @@ func TestParseFromStackTrace(t *testing.T) {
213211
}
214212

215213
newFiles := fstest.MapFS{
216-
"main.py": &fstest.MapFile{
214+
"hello.py": &fstest.MapFile{
217215
Data: []byte(`def main():
218216
print("Hello, World!")
219217
`),
@@ -232,9 +230,9 @@ func TestParseFromStackTrace(t *testing.T) {
232230
}
233231

234232
// check if the document is parsed
235-
doc, ok = contextData.Documents["main.py"]
233+
doc, ok = contextData.Documents["hello.py"]
236234
if !ok {
237-
t.Error("main.py document not found")
235+
t.Error("hello.py document not found")
238236
}
239237

240238
// check if doc language is same as currentLang

0 commit comments

Comments
 (0)