Skip to content

Commit

Permalink
Merge pull request #50 from dmesquita/master
Browse files Browse the repository at this point in the history
Improve error message for has_dtype()
  • Loading branch information
TomAugspurger committed Mar 14, 2018
2 parents 7a00025 + b6c1f63 commit 6721466
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions engarde/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def has_dtypes(df, items):
dtypes = df.dtypes
for k, v in items.items():
if not dtypes[k] == v:
raise AssertionError("{} has the wrong dtype ({})".format(k, v))
raise AssertionError("{} has the wrong dtype. Should be ({}), is ({})".format(k, v,dtypes[k]))
return df


Expand Down Expand Up @@ -299,4 +299,3 @@ def is_same_as(df, df_to_compare, **kwargs):
'unique_index', 'within_n_std', 'within_range', 'within_set',
'has_dtypes', 'verify', 'verify_all', 'verify_any',
'one_to_many','is_same_as',]

0 comments on commit 6721466

Please sign in to comment.