@@ -114,12 +114,27 @@ def test_index2label(caplog):
114
114
115
115
@pytest .mark .enable_socket ()
116
116
def test_index2label_kids ():
117
- url = "https://www.bk.admin.ch/dam/bk/de/dokumente/terminologie/publikation_25_jahre_rtd.pdf.download .pdf/Terminologie_Epochen,%20Schwerpunkte,%20Umsetzungen.pdf" # noqa: E501
117
+ url = "https://github.com/py-pdf/pypdf/files/14858124/Terminologie_Epochen.Schwerpunkte.Umsetzungen .pdf"
118
118
r = PdfReader (BytesIO (get_data_from_url (url = url , name = "index2label_kids.pdf" )))
119
119
expected = [
120
120
"C1" ,
121
- "I" , "II" , "III" , "IV" , "V" , "VI" , "VII" , "VIII" , "IX" , "X" ,
122
- "XI" , "XII" , "XIII" , "XIV" , "XV" , "XVI" , "XVII" ,
121
+ "I" ,
122
+ "II" ,
123
+ "III" ,
124
+ "IV" ,
125
+ "V" ,
126
+ "VI" ,
127
+ "VII" ,
128
+ "VIII" ,
129
+ "IX" ,
130
+ "X" ,
131
+ "XI" ,
132
+ "XII" ,
133
+ "XIII" ,
134
+ "XIV" ,
135
+ "XV" ,
136
+ "XVI" ,
137
+ "XVII" ,
123
138
] + list (map (str , range (1 , 284 )))
124
139
for x in ["20" , "44" , "58" , "82" , "94" , "116" , "154" , "166" , "192" , "224" , "250" ]:
125
140
# Some page labels are unused. Removing them is still easier than copying the
@@ -131,10 +146,29 @@ def test_index2label_kids():
131
146
@pytest .mark .enable_socket ()
132
147
def test_index2label_kids__recursive (caplog ):
133
148
url = "https://github.com/py-pdf/pypdf/files/14842446/tt1.pdf"
134
- r = PdfReader (BytesIO (get_data_from_url (url = url , name = "index2label_kids_recursive.pdf" )))
149
+ r = PdfReader (
150
+ BytesIO (get_data_from_url (url = url , name = "index2label_kids_recursive.pdf" ))
151
+ )
135
152
expected = [
136
- "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "I" , "J" , "K" , "L" ,
137
- "M" , "N" , "O" , "P" , "17" , "18" , "19"
153
+ "A" ,
154
+ "B" ,
155
+ "C" ,
156
+ "D" ,
157
+ "E" ,
158
+ "F" ,
159
+ "G" ,
160
+ "H" ,
161
+ "I" ,
162
+ "J" ,
163
+ "K" ,
164
+ "L" ,
165
+ "M" ,
166
+ "N" ,
167
+ "O" ,
168
+ "P" ,
169
+ "17" ,
170
+ "18" ,
171
+ "19" ,
138
172
]
139
173
assert r .page_labels == expected
140
174
assert caplog .text != ""
0 commit comments