diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py index 0a8341476dc56..8cfd0682e1f5d 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -2128,3 +2128,22 @@ def test_constructor(rand_series_with_duplicate_datetimeindex): def test_numpy_array(input_dict, expected): result = np.array([Series(input_dict)]) tm.assert_numpy_array_equal(result, expected) + + +def test_index_ordered_dict_keys(): + # GH 22077 + + param_index = OrderedDict( + [ + ((("a", "b"), ("c", "d")), 1), + ((("a", None), ("c", "d")), 2), + ] + ) + series = Series([1, 2], index=param_index.keys()) + expected = Series( + [1, 2], + index=MultiIndex.from_tuples( + [(("a", "b"), ("c", "d")), (("a", None), ("c", "d"))] + ), + ) + tm.assert_series_equal(series, expected)