@@ -56,18 +56,18 @@ void testParseNotebook() throws IOException {
56
56
mapToColumnMappingList (Map .of (10 , 1 , 19 , 1 ))));
57
57
//"source": "#Some code\nprint(\"hello world\\n\")",
58
58
assertThat (result .locationMap ()).extracting (map -> map .get (16 )).isEqualTo (new IPythonLocation (64 , 14 , List .of (), true ));
59
- assertThat (result .locationMap ()).extracting (map -> map .get (17 )).isEqualTo (new IPythonLocation (64 , 27 , mapToColumnMappingList (Map .of (6
59
+ assertThat (result .locationMap ()).extracting (map -> map .get (17 )).isEqualTo (new IPythonLocation (64 , 26 , mapToColumnMappingList (Map .of (6
60
60
, 1 , 18 , 1 , 20 , 1 )), true ));
61
61
//"source": "print(\"My\\ntext\")\nprint(\"Something else\\n\")"
62
62
assertThat (result .locationMap ()).extracting (map -> map .get (22 )).isEqualTo (new IPythonLocation (83 , 14 , mapToColumnMappingList (Map .of (6
63
63
, 1 , 9 , 1 , 15 , 1 )), true ));
64
- assertThat (result .locationMap ()).extracting (map -> map .get (23 )).isEqualTo (new IPythonLocation (83 , 37 , mapToColumnMappingList (Map .of (6
64
+ assertThat (result .locationMap ()).extracting (map -> map .get (23 )).isEqualTo (new IPythonLocation (83 , 36 , mapToColumnMappingList (Map .of (6
65
65
, 1 , 21 , 1 , 23 , 1 )), true ));
66
66
67
67
//"source": "a = \"A bunch of characters \\n \\f \\r \\ \"\nb = None"
68
68
assertThat (result .locationMap ()).extracting (map -> map .get (25 ))
69
69
.isEqualTo (new IPythonLocation (90 , 14 , mapToColumnMappingList (Map .of (4 , 1 , 27 , 1 , 30 , 1 , 33 , 1 , 36 , 1 , 39 , 1 )), true ));
70
- assertThat (result .locationMap ()).extracting (map -> map .get (26 )).isEqualTo (new IPythonLocation (90 , 63 , List .of (), true ));
70
+ assertThat (result .locationMap ()).extracting (map -> map .get (26 )).isEqualTo (new IPythonLocation (90 , 62 , List .of (), true ));
71
71
// last line with the cell delimiter which contains the EOF token
72
72
assertThat (result .locationMap ()).extracting (map -> map .get (27 )).isEqualTo (new IPythonLocation (90 , 14 , List .of ()));
73
73
}
@@ -173,15 +173,15 @@ void testParseNotebookSingleLine() throws IOException {
173
173
assertThat (result .locationMap ()).hasSize (9 );
174
174
assertThat (result .contents ()).hasLineCount (9 );
175
175
// position of variable t
176
- assertThat (result .locationMap ().get (4 ).column ()).isEqualTo (452 );
176
+ assertThat (result .locationMap ().get (4 ).column ()).isEqualTo (451 );
177
177
178
178
// First and second line
179
179
assertThat (result .locationMap ()).containsEntry (1 , new IPythonLocation (1 , 382 , List .of (), true ));
180
- assertThat (result .locationMap ()).containsEntry (2 , new IPythonLocation (1 , 429 , List .of (), true ));
180
+ assertThat (result .locationMap ()).containsEntry (2 , new IPythonLocation (1 , 428 , List .of (), true ));
181
181
182
182
assertThat (result .locationMap ()).containsEntry (6 , new IPythonLocation (1 , 559 , mapToColumnMappingList (Map .of (0 , 1 , 1 , 1 , 2 , 1 )), true ));
183
- assertThat (result .locationMap ()).containsEntry (7 , new IPythonLocation (1 , 610 , List .of (), true ));
184
- assertThat (result .locationMap ()).containsEntry (8 , new IPythonLocation (1 , 637 , mapToColumnMappingList (Map .of (1 , 1 , 2 , 1 , 0 , 1 )), true ));
183
+ assertThat (result .locationMap ()).containsEntry (7 , new IPythonLocation (1 , 609 , List .of (), true ));
184
+ assertThat (result .locationMap ()).containsEntry (8 , new IPythonLocation (1 , 636 , mapToColumnMappingList (Map .of (1 , 1 , 2 , 1 , 0 , 1 )), true ));
185
185
}
186
186
187
187
@ Test
0 commit comments