Suite test fails with python == 2.7.12
Closed this issue · 2 comments
Starou commented
2.6.12
======================================================================
FAIL: test_add_pages_from_idml_to_template (regressiontests.idml.IdmlTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/tests/regressiontests/idml.py", line 3636, in test_add_pages_from_idml_to_template
self.assertEqual(len(f.pages), 4)
AssertionError: 2 != 4
2.6.14 :
======================================================================
FAIL: test_add_pages_from_idml (regressiontests.idml.IdmlTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/tests/regressiontests/idml.py", line 3604, in test_add_pages_from_idml
'Spreads/Spread_editoubd.xml']
AssertionError: Items in the first set but not the second:
'Spreads/Spread_editoub8.xml'
'Spreads/Spread_editoub7.xml'
Items in the second set but not the first:
'Spreads/Spread_editoubd.xml'
Starou commented
Looks like this is a flaw in the way last_spread
is resolved. In IDMLPackage.add_new_spread()
and IDMLPackage.add_page_from_idml()
:
last_spread = self.spreads_objects[-1]
Which is the last spread element from .namelist()
. This is wrong!
Starou commented
Fixed in Python3 support branch