Skip to content

Commit

Permalink
Merge pull request #432 from great-expectations/feature/version_warning
Browse files Browse the repository at this point in the history
Improve version mismatch warning (#401)
  • Loading branch information
jcampbell committed Apr 23, 2019
2 parents 8085c4d + 2a6f14e commit e5a68e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion great_expectations/data_asset/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def validate(self, expectations_config=None, evaluation_parameters=None, catch_e
try:
if expectations_config['meta']['great_expectations.__version__'] != __version__:
warnings.warn(
"WARNING: This configuration object was built using a different version of great_expectations than is currently validating it.")
"WARNING: This configuration object was built using version %s of great_expectations, but is currently being valided by version %s." % (expectations_config['meta']['great_expectations.__version__'], __version__))
except KeyError:
warnings.warn(
"WARNING: No great_expectations version found in configuration object.")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ def test_meta_version_warning(self):
out = D.validate(expectations_config={
"meta": {"great_expectations.__version__": "0.0.0"}, "expectations": []})
self.assertEqual(str(w[0].message),
"WARNING: This configuration object was built using a different version of great_expectations than is currently validating it.")
"WARNING: This configuration object was built using version 0.0.0 of great_expectations, but is currently being valided by version %s." % ge.__version__)

def test_catch_exceptions_with_bad_expectation_type(self):
my_df = ge.dataset.PandasDataset({"x": range(10)})
Expand Down

0 comments on commit e5a68e5

Please sign in to comment.