Is there any way to isolate this to only execute when tests are being run? If it's not simple to do that, don't worry.