Skip to content

Commit

Permalink
Tests: update expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Nov 5, 2024
1 parent a72b1ff commit 13581d1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def is_registered_term(index: Any, keyword: str) -> bool:
def test_objects_are_escaped(app):
app.build(force_all=True)
index = load_searchindex(app.outdir / 'searchindex.js')
for item in index.get('objects').get(''):
for _, item in index.get('objects').get('').items():

Check failure on line 94 in tests/test_search.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (PERF102)

tests/test_search.py:94:20: PERF102 When using only the values of a dict use the `values()` method
if item[-1] == 'n::Array&lt;T, d&gt;': # n::Array<T,d> is escaped
break
else:
Expand Down Expand Up @@ -236,10 +236,10 @@ def test_IndexBuilder():
'envversion': '1.0',
'filenames': ['filename1_1', 'filename1_2', 'filename2_1', 'filename2_2'],
'objects': {
'': [
(0, 0, 1, '#anchor', 'objdispname1'),
(2, 1, 1, '#anchor', 'objdispname1'),
]
'': {
0: (0, 0, 1, '#anchor', 'objdispname1'),
1: (2, 1, 1, '#anchor', 'objdispname1'),
}
},
'objnames': {
0: ('dummy1', 'objtype1', 'objtype1'),
Expand All @@ -260,13 +260,13 @@ def test_IndexBuilder():
'section_titl': [0, 1, 2, 3],
},
'alltitles': {
'another_title': [
(0, 'another-title'),
(1, 'another-title'),
(2, 'another-title'),
(3, 'another-title'),
],
'section_title': [(0, None), (1, None), (2, None), (3, None)],
'another_title': {
0: (0, 'another-title'),
1: (1, 'another-title'),
2: (2, 'another-title'),
3: (3, 'another-title'),
},
'section_title': {0: (0, None), 1: (1, None), 2: (2, None), 3: (3, None)},
},
'indexentries': {},
}
Expand Down Expand Up @@ -348,8 +348,8 @@ def test_IndexBuilder():
'section_titl': [0, 1],
},
'alltitles': {
'another_title': [(0, 'another-title'), (1, 'another-title')],
'section_title': [(0, None), (1, None)],
'another_title': {0: (0, 'another-title'), 1: (1, 'another-title')},
'section_title': {0: (0, None), 1: (1, None)},
},
'indexentries': {},
}
Expand Down

0 comments on commit 13581d1

Please sign in to comment.