Skip to content

Commit 35220f1

Browse files
committed
TST: raise assertionerror instead
1 parent 9183ce7 commit 35220f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,8 +1904,9 @@ def _sanitize_column(self, key, value):
19041904
else:
19051905
value = value.reindex(self.index).values
19061906
else:
1907-
msg = 'Length of values does not match length of index'
1908-
assert len(value) == len(self.index), msg
1907+
if len(value) != len(self.index):
1908+
raise AssertionError('Length of values does not match '
1909+
'length of index')
19091910

19101911
if not isinstance(value, np.ndarray):
19111912
value = com._asarray_tuplesafe(value)

0 commit comments

Comments
 (0)