Skip to content

Commit ff6105d

Browse files
committedMay 6, 2017
add missing test fixture
1 parent 494b0a3 commit ff6105d

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed
 

‎pyexcel_odsr/messyods.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,17 @@ def _read_cell(element):
190190

191191

192192
def _read_text_cell(element):
193-
text_content = _recursively_read_text_cell(element)
193+
children = element.getchildren()
194+
text_content = []
195+
for child in children:
196+
text = "".join([x for x in child.itertext()])
197+
text_content.append(text)
194198
if len(text_content) > 0:
195199
cell_value = '\n'.join(text_content)
196200
else:
197201
cell_value = ''
198202
return (cell_value, 'string')
199203

200204

201-
def _recursively_read_text_cell(element):
202-
children = element.getchildren()
203-
texts = []
204-
for child in children:
205-
text = "".join([x for x in child.itertext()])
206-
texts.append(text)
207-
return texts
208-
209-
210205
def _tag(namespace, tag):
211206
return '{%s}%s' % (namespace, tag)

‎tests/fixtures/multinode-in-a-p.ods

10.8 KB
Binary file not shown.

‎tests/test_bug_fixes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def test_issue_1_error():
7676
eq_(result, None)
7777

7878

79-
def test_issue_19():
80-
test_file = "pyexcel_81_ods_19.ods"
79+
def test_issue_2():
80+
test_file = "multinode-in-a-p.ods"
8181
data = get_data(os.path.join("tests", "fixtures", test_file),
8282
skip_empty_rows=True, library='pyexcel-odsr')
8383
eq_(data['product.template'][1][1], 'PRODUCT NAME PMP')

0 commit comments

Comments
 (0)