Skip to content

Commit

Permalink
exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Feb 4, 2023
1 parent f9d7e03 commit 3bc92fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions _unittests/ut_df/test_connex_split.py
Expand Up @@ -109,7 +109,7 @@ def test_split_connex(self):
s1 = set(train[col])
s2 = set(test[col])
if s1 & s2:
raise Exception(
raise AssertionError(
f'Non empty intersection {s1} & {s2}\n{train}\n{test}')

df['connex'] = 'ole'
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_split_connex2(self):
rows = []
for k, v in sorted(stats[0].items()):
rows.append(f"{k}={v}")
raise Exception(
raise AssertionError(
'Non empty intersection {0} & {1}\n{2}\n{3}\n{4}'.format(s1, s2, train, test, "\n".join(rows)))

def test_split_connex_missing(self):
Expand Down Expand Up @@ -181,7 +181,7 @@ def test_split_connex_missing(self):
rows = []
for k, v in sorted(stats[0].items()):
rows.append(f"{k}={v}")
raise Exception(
raise AssertionError(
'Non empty intersection {0} & {1}\n{2}\n{3}\n{4}'.format(s1, s2, train, test, "\n".join(rows)))


Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_df/test_pandas_groupbynan.py
Expand Up @@ -48,7 +48,7 @@ def test_pandas_groupbynan(self):
try:
gr = pandas_groupby_nan(df, ("value", "this"))
t = True
raise Exception("---")
raise AssertionError("---")
except TypeError:
t = False
if t:
Expand Down

0 comments on commit 3bc92fa

Please sign in to comment.