test_aide.pandas.index_preserved_params¶
- test_aide.pandas.index_preserved_params(df_1, df_2, seed=0)[source]¶
Helper function to create copies of input pd.DataFrames pairs in a list of pytest.params where each copy has a different index (random, increasing and decreasing), the last item in the list is a pytest.param of the original inputs.
This function can be used in combination with the pytest.mark.parametrize decorator to easily test that a transformer transform method preserves the index of the input.