Put the script in a comment at the top of the code. It looks kinda funny and people tend to dislike that kind of thing in pull-requests, but I always just ask them to hold their breath and pretend the script isn't there. If the script isn't still useful the next time that code has meaningful change then remove it. I've never seen such scripts get removed - in fact they tend to evolve as the code they test/generate/modify does.