Skip to content

Commit

Permalink
Removed unicode json write for Python 2 functionality; and disabled K…
Browse files Browse the repository at this point in the history
…L divergence for date data types
  • Loading branch information
talagluck committed Aug 1, 2019
1 parent efd08e1 commit fcbd89f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions great_expectations/profile/basic_dataset_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ def _profile(cls, dataset):

df.expect_column_max_to_be_between(column, min_value=None, max_value=None)

df.expect_column_kl_divergence_to_be_less_than(column, partition_object=None,
threshold=None, result_format='COMPLETE')
# Re-add once kl_divergence has been modified to support datetimes
# df.expect_column_kl_divergence_to_be_less_than(column, partition_object=None,
# threshold=None, result_format='COMPLETE')

if cardinality in ["one", "two", "very few", "few"]:
df.expect_column_distinct_values_to_be_in_set(column, value_set=None, result_format="SUMMARY")
Expand Down
7 changes: 6 additions & 1 deletion tests/render/test_render_BulletListContentBlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import json
import pytest
from string import Template as pTemplate

from six import PY2

def test_substitute_none_for_missing():
assert substitute_none_for_missing(
Expand Down Expand Up @@ -74,5 +74,10 @@ def test_all_expectations_using_test_definitions():
})

# TODO: accommodate case where multiple datasets exist within one expectation test definition

# We encountered unicode coding errors on Python 2, but since this is just a smoke test, review the smoke test results in python 3.
if PY2:
return

with open('./tests/render/output/test_render_bullet_list_content_block.json', 'w') as f:
json.dump(test_results, f, indent=2)

0 comments on commit fcbd89f

Please sign in to comment.