diff --git a/rolltable/tables.py b/rolltable/tables.py index 083e2d3..acab4dc 100644 --- a/rolltable/tables.py +++ b/rolltable/tables.py @@ -267,11 +267,11 @@ class RollTable: self._data = [] for src in self._sources: if type(src) is str: - ds = DataSource(src, frequency=self._frequency) + src = [src] + for one_source in src: + ds = DataSource(one_source, frequency=self._frequency) ds.load_source() self._data.append(ds) - else: - self._data.append(src) # merge the headers self._headers = [] diff --git a/tests/test_tables.py b/tests/test_tables.py index 3b745ea..43dd6f7 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -205,5 +205,6 @@ def test_text(): def test_as_dict(): - ds = tables.RollTable([fixture_metadata + fixture_source]).datasources[0].as_dict() - assert ds['Option 1']['Header 1'] == 'Option 1' + source = tables.RollTable([fixture_no_descriptions]).datasources[0] + ds = source.as_dict() + assert ds['option 1']['choice'] == 'choice 1'