timer that did not return a float and a timer was still running when the
Profiler object was garbage collected.
Fixes issue 3895.
Code review by Benjamin Peterson.
* Convert both to unittest.
* Use the same unit testing code.
* Include the expected output in both test files.
* Make it possible to regenerate the expected output by running
the file as a script with an '-r' argument.