The general attitude towards testing code is usually that the quality isn't as important as that of the actual production code.
That's how I work most of the time as well. If it involves copy-paste, so be it. It's not that big a deal.
But just now I created a simple module that extends Win32::GUI to provide some introspection of a created window. I put it in a module to encapsulate the poking-in-the-internals that otherwise could be sensitive to implementation changes.
And two set of tests in the
How do you treat testing code? Do you keep it well factored? Do you write your own Test::Builder extensions?