412554b2f06f3782c9336f5a4dfc5bb890219afd,pandas/tests/indexing/test_coercion.py,TestInsertIndexCoercion,test_insert_index_datetimes,#TestInsertIndexCoercion#Any#Any#Any#Any#,443

Before Change


            request.node.add_marker(
                pytest.mark.xfail(reason="ToDo: must coerce to object")
            )
        elif fill_val.tz != insert_value.tz:
            request.node.add_marker(
                pytest.mark.xfail(reason="GH 37605 - require tz equality?")
            )

After Change


        )
        self._assert_insert_conversion(obj, fill_val, exp, exp_dtype)

        if fill_val.tz:

            // mismatched tzawareness
            ts = pd.Timestamp("2012-01-01")
            result = obj.insert(1, ts)
            expected = obj.astype(object).insert(1, ts)
            assert expected.dtype == object
            tm.assert_index_equal(result, expected)

            // mismatched tz --> cast to object (could reasonably cast to commom tz)
            ts = pd.Timestamp("2012-01-01", tz="Asia/Tokyo")
            result = obj.insert(1, ts)
            expected = obj.astype(object).insert(1, ts)
            assert expected.dtype == object
            tm.assert_index_equal(result, expected)

        else:
            // mismatched tzawareness
            ts = pd.Timestamp("2012-01-01", tz="Asia/Tokyo")
            result = obj.insert(1, ts)
            expected = obj.astype(object).insert(1, ts)
            assert expected.dtype == object
            tm.assert_index_equal(result, expected)

        item = 1
        result = obj.insert(1, item)
        expected = obj.astype(object).insert(1, item)
        assert expected[1] == item
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pandas-dev/pandas
Commit Name: 412554b2f06f3782c9336f5a4dfc5bb890219afd
Time: 2021-01-21
Author: jbrockmendel@gmail.com
File Name: pandas/tests/indexing/test_coercion.py
Class Name: TestInsertIndexCoercion
Method Name: test_insert_index_datetimes


Project Name: pmorissette/bt
Commit Name: b2b8447ee3ccfd7ca63414bb8f5788992269f0fe
Time: 2018-04-12
Author: jordan.platts@ahss.org
File Name: bt/algos.py
Class Name: RunDaily
Method Name: __call__


Project Name: pmorissette/bt
Commit Name: b2b8447ee3ccfd7ca63414bb8f5788992269f0fe
Time: 2018-04-12
Author: jordan.platts@ahss.org
File Name: bt/algos.py
Class Name: RunWeekly
Method Name: __call__