Skip to content

Commit 3bc92fa

Browse files
committed
exceptions
1 parent f9d7e03 commit 3bc92fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

_unittests/ut_df/test_connex_split.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_split_connex(self):
109109
s1 = set(train[col])
110110
s2 = set(test[col])
111111
if s1 & s2:
112-
raise Exception(
112+
raise AssertionError(
113113
f'Non empty intersection {s1} & {s2}\n{train}\n{test}')
114114

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

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

187187

_unittests/ut_df/test_pandas_groupbynan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_pandas_groupbynan(self):
4848
try:
4949
gr = pandas_groupby_nan(df, ("value", "this"))
5050
t = True
51-
raise Exception("---")
51+
raise AssertionError("---")
5252
except TypeError:
5353
t = False
5454
if t:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy