From 14d1c653cc88a61bcd9fa1b61c3e02f452aace74 Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Mon, 6 Nov 2017 23:23:30 +0100 Subject: [PATCH] Fix tests, bump version, universal wheel --- followthemoney/mapping/property.py | 2 ++ setup.cfg | 2 ++ setup.py | 2 +- tests/test_mapping.py | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 setup.cfg diff --git a/followthemoney/mapping/property.py b/followthemoney/mapping/property.py index 4764ab0dc..cc5e1b155 100644 --- a/followthemoney/mapping/property.py +++ b/followthemoney/mapping/property.py @@ -1,4 +1,5 @@ import re +from copy import deepcopy from normality import stringify from banal import unique_list, ensure_list @@ -9,6 +10,7 @@ class PropertyMapping(object): FORMAT_PATTERN = re.compile('{{([^(}})]*)}}') def __init__(self, mapper, data, schema): + data = deepcopy(data) self.mapper = mapper self.data = data self.schema = schema diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..3480374bc --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 \ No newline at end of file diff --git a/setup.py b/setup.py index 4a59d0778..75d6beb70 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='followthemoney', - version='0.2.3', + version='0.3.0', long_description="Data model and validator for investigative graph data.", author='Organized Crime and Corruption Reporting Project', author_email='pudo@occrp.org', diff --git a/tests/test_mapping.py b/tests/test_mapping.py index 14e19dade..39fe7150b 100644 --- a/tests/test_mapping.py +++ b/tests/test_mapping.py @@ -45,7 +45,9 @@ def test_kek_sqlite(self): def test_local_csv_load(self): url = 'file://' + os.path.join(self.fixture_path, 'experts.csv') - mapping = {'csv_url': url} + mapping = { + 'csv_url': url + } with self.assertRaises(InvalidMapping): list(model.map_entities(mapping)) mapping['entities'] = {