def test_expected_output(self, df, expected):
        """Test that transform then inverse_transform gets back to the original df."""

        x = NominalToIntegerTransformer(columns=["a", "b"])

        # set the mapping dict directly rather than fitting x on df so test works with helpers
        x.mappings = {
            "a": {
                1: 0,
                2: 1,
                3: 2,
                4: 3,
                5: 4,
                6: 5
            },
            "b": {
                "a": 0,
                "b": 1,
                "c": 2,
                "d": 3,
                "e": 4,
                "f": 5
            },
        }

        df_transformed = x.transform(df)

        df_transformed_back = x.inverse_transform(df_transformed)

        h.assert_frame_equal_msg(
            actual=df_transformed_back,
            expected=expected,
            msg_tag="transform reverse does not get back to original",
        )
    def test_expected_output(self, df, expected):
        """Test that the output is expected from transform."""

        x = NominalToIntegerTransformer(columns=["a", "b"])

        # set the mapping dict directly rather than fitting x on df so test works with helpers
        x.mappings = {
            "a": {
                1: 0,
                2: 1,
                3: 2,
                4: 3,
                5: 4,
                6: 5
            },
            "b": {
                "a": 0,
                "b": 1,
                "c": 2,
                "d": 3,
                "e": 4,
                "f": 5
            },
        }

        df_transformed = x.transform(df)

        h.assert_frame_equal_msg(
            actual=df_transformed,
            expected=expected,
            msg_tag=
            "Unexpected values in NominalToIntegerTransformer.transform",
        )