Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lint
  • Loading branch information
h-vetinari committed Nov 18, 2018
commit 8f78023913ca465754f76b5aa3fc765bbaf394d1
5 changes: 3 additions & 2 deletions pandas/tests/series/test_combine_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ def test_update_dtypes(self, caller_dtype, other_values):
# other_values is object, cannot be cast
([(61,), (63,)], 'int64', pd.Series([10, (61,), 12])),
([(61,), (63,)], float, pd.Series([10., (61,), 12.])),
([(61,), (63,)], object, pd.Series([10, (61,), 12]))
([(61,), (63,)], object, pd.Series([10, (61,), 12]))
])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jreback, this PR is not meant to add the same test twice in different ways, I'm just showing what your review requirement (to avoid try-except) would mean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a MUCH better test. It is very explicit. remove the other, rename and ping.

def test_update_dtypes_no_try_catch(self, other_values, caller_dtype, expected):
def test_update_dtypes_no_try_catch(self, other_values,
caller_dtype, expected):
caller_values = [10, 11, 12]
s = Series(caller_values, dtype=caller_dtype)
other = Series(other_values, index=[1, 3])
Expand Down