Skip to content

Commit

Permalink
add test for old serialization files
Browse files Browse the repository at this point in the history
  • Loading branch information
chidauri committed Sep 13, 2019
1 parent 0f9be05 commit 174c732
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion featuretools/tests/entityset_tests/test_serialization.py
@@ -1,4 +1,5 @@
import errno
import json
import os
import shutil

Expand Down Expand Up @@ -268,11 +269,15 @@ def test_serialize_url_csv(es):
es.to_csv(URL, encoding='utf-8', engine='python')


def test_serialize_data_description(es, tmpdir):
def test_serialize_subdirs_not_removed(es, tmpdir):
write_path = tmpdir.mkdir("test")
test_dir = write_path.mkdir("test_dir")
with open(write_path.join('data_description.json'), 'w') as f:
json.dump('__SAMPLE_TEXT__', f)
serialize.write_data_description(es, path=str(write_path), index='1', sep='\t', encoding='utf-8', compression=None)
assert os.path.exists(str(test_dir))
with open(write_path.join('data_description.json'), 'r') as f:
assert '__SAMPLE_TEXT__' not in json.load(f)


def test_deserialize_url_csv(es):
Expand Down

0 comments on commit 174c732

Please sign in to comment.