def METHOD_NAME(rule_runner: RuleRunner) -> None:
    rule_runner.write_files(
        {
            "src/BUILD": dedent(
                """\
                python_sources()
                python_distribution(
                  name="dist",
                  provides=python_artifact(
                    name="my-package",
                    version="0.1.0",
                  ),
                  repositories=["mocked-repo"],
                )
                """
            ),
        }
    )
    result = rule_runner.run_goal_rule(
        Publish,
        args=("src:dist",),
        env_inherit={"HOME", "PATH", "PYENV_ROOT"},
    )
    assert result.exit_code == 0
    assert "my-package-0.1.0.tar.gz published." in result.stderr
    assert "my_package-0.1.0-py3-none-any.whl published." in result.stderr
    assert "mocked-repo" in result.stdout