15
15
16
16
class BoldTestCase (_TranslationTestCase ):
17
17
expected_output = """
18
- <p><b>AAA</b></p>
19
- <p>BBB</p>
18
+ <p><b>AAA</b></p>
19
+ <p>BBB</p>
20
20
"""
21
21
22
22
def get_xml (self ):
@@ -74,8 +74,7 @@ class HyperlinkNoTextTestCase(_TranslationTestCase):
74
74
'rId0' : 'www.google.com' ,
75
75
}
76
76
77
- expected_output = '''
78
- '''
77
+ expected_output = ''
79
78
80
79
def get_xml (self ):
81
80
run_tags = []
@@ -90,9 +89,7 @@ class HyperlinkNotInRelsDictTestCase(_TranslationTestCase):
90
89
# 'rId0': 'www.google.com', missing
91
90
}
92
91
93
- expected_output = '''
94
- <p>link.</p>
95
- '''
92
+ expected_output = '<p>link.</p>'
96
93
97
94
def get_xml (self ):
98
95
run_tags = []
@@ -109,9 +106,7 @@ class HyperlinkWithBreakTestCase(_TranslationTestCase):
109
106
'rId0' : 'www.google.com' ,
110
107
}
111
108
112
- expected_output = '''
113
- <p><a href="www.google.com">link<br/></a></p>
114
- '''
109
+ expected_output = '<p><a href="www.google.com">link<br/></a></p>'
115
110
116
111
def get_xml (self ):
117
112
run_tags = []
@@ -129,12 +124,12 @@ class ImageTestCase(_TranslationTestCase):
129
124
'rId1' : 'media/image2.jpeg' ,
130
125
}
131
126
expected_output = '''
132
- <p>
133
- <img src="media/image1.jpeg" height="20px" width="40px" />
134
- </p>
135
- <p>
136
- <img src="media/image2.jpeg" height="21pt" width="41pt" />
137
- </p>
127
+ <p>
128
+ <img src="media/image1.jpeg" height="20px" width="40px" />
129
+ </p>
130
+ <p>
131
+ <img src="media/image2.jpeg" height="21pt" width="41pt" />
132
+ </p>
138
133
'''
139
134
140
135
def get_xml (self ):
@@ -202,8 +197,7 @@ class ImageNotInRelsDictTestCase(_TranslationTestCase):
202
197
relationship_dict = {
203
198
# 'rId0': 'media/image1.jpeg',
204
199
}
205
- expected_output = '''
206
- '''
200
+ expected_output = ''
207
201
208
202
def get_xml (self ):
209
203
drawing = DXB .drawing (height = 20 , width = 40 , r_id = 'rId0' )
@@ -255,16 +249,16 @@ def get_xml(self):
255
249
256
250
class TableTag (_TranslationTestCase ):
257
251
expected_output = '''
258
- <table border="1">
259
- <tr>
260
- <td>AAA</td>
261
- <td>BBB</td>
262
- </tr>
263
- <tr>
264
- <td>CCC</td>
265
- <td>DDD</td>
266
- </tr>
267
- </table>
252
+ <table border="1">
253
+ <tr>
254
+ <td>AAA</td>
255
+ <td>BBB</td>
256
+ </tr>
257
+ <tr>
258
+ <td>CCC</td>
259
+ <td>DDD</td>
260
+ </tr>
261
+ </table>
268
262
'''
269
263
270
264
def get_xml (self ):
@@ -324,16 +318,16 @@ def get_xml(self):
324
318
325
319
class TableWithInvalidTag (_TranslationTestCase ):
326
320
expected_output = '''
327
- <table border="1">
328
- <tr>
329
- <td>AAA</td>
330
- <td>BBB</td>
331
- </tr>
332
- <tr>
333
- <td></td>
334
- <td>DDD</td>
335
- </tr>
336
- </table>
321
+ <table border="1">
322
+ <tr>
323
+ <td>AAA</td>
324
+ <td>BBB</td>
325
+ </tr>
326
+ <tr>
327
+ <td></td>
328
+ <td>DDD</td>
329
+ </tr>
330
+ </table>
337
331
'''
338
332
339
333
def get_xml (self ):
@@ -392,11 +386,11 @@ def get_xml(self):
392
386
393
387
class SimpleListTestCase (_TranslationTestCase ):
394
388
expected_output = '''
395
- <ol list-style-type="lowerLetter">
396
- <li>AAA</li>
397
- <li>BBB</li>
398
- <li>CCC</li>
399
- </ol>
389
+ <ol list-style-type="lowerLetter">
390
+ <li>AAA</li>
391
+ <li>BBB</li>
392
+ <li>CCC</li>
393
+ </ol>
400
394
'''
401
395
402
396
# Ensure its not failing somewhere and falling back to decimal
@@ -422,9 +416,9 @@ def get_xml(self):
422
416
423
417
class SingleListItemTestCase (_TranslationTestCase ):
424
418
expected_output = '''
425
- <ol list-style-type="lowerLetter">
426
- <li>AAA</li>
427
- </ol>
419
+ <ol list-style-type="lowerLetter">
420
+ <li>AAA</li>
421
+ </ol>
428
422
'''
429
423
430
424
# Ensure its not failing somewhere and falling back to decimal
@@ -448,22 +442,22 @@ def get_xml(self):
448
442
449
443
class ListWithContinuationTestCase (_TranslationTestCase ):
450
444
expected_output = '''
451
- <ol list-style-type="decimal">
452
- <li>AAA<br/>BBB</li>
453
- <li>CCC
454
- <table border="1">
455
- <tr>
456
- <td>DDD</td>
457
- <td>EEE</td>
458
- </tr>
459
- <tr>
460
- <td>FFF</td>
461
- <td>GGG</td>
462
- </tr>
463
- </table>
464
- </li>
465
- <li>HHH</li>
466
- </ol>
445
+ <ol list-style-type="decimal">
446
+ <li>AAA<br/>BBB</li>
447
+ <li>CCC
448
+ <table border="1">
449
+ <tr>
450
+ <td>DDD</td>
451
+ <td>EEE</td>
452
+ </tr>
453
+ <tr>
454
+ <td>FFF</td>
455
+ <td>GGG</td>
456
+ </tr>
457
+ </table>
458
+ </li>
459
+ <li>HHH</li>
460
+ </ol>
467
461
'''
468
462
469
463
def get_xml (self ):
@@ -490,21 +484,21 @@ def get_xml(self):
490
484
491
485
class ListWithMultipleContinuationTestCase (_TranslationTestCase ):
492
486
expected_output = '''
493
- <ol list-style-type="decimal">
494
- <li>AAA
495
- <table border="1">
496
- <tr>
497
- <td>BBB</td>
498
- </tr>
499
- </table>
500
- <table border="1">
501
- <tr>
502
- <td>CCC</td>
503
- </tr>
504
- </table>
505
- </li>
506
- <li>DDD</li>
507
- </ol>
487
+ <ol list-style-type="decimal">
488
+ <li>AAA
489
+ <table border="1">
490
+ <tr>
491
+ <td>BBB</td>
492
+ </tr>
493
+ </table>
494
+ <table border="1">
495
+ <tr>
496
+ <td>CCC</td>
497
+ </tr>
498
+ </table>
499
+ </li>
500
+ <li>DDD</li>
501
+ </ol>
508
502
'''
509
503
510
504
def get_xml (self ):
@@ -616,8 +610,7 @@ def get_xml(self):
616
610
617
611
618
612
class DeeplyNestedTableTestCase (_TranslationTestCase ):
619
- expected_output = '''
620
- '''
613
+ expected_output = ''
621
614
run_expected_output = False
622
615
623
616
def get_xml (self ):
0 commit comments