Has anyone released a mock time module?

P

Peter Hansen

Along the lines of my post just now about a mock filesystem,
I'm also interested in any work in the area of mock
timing.

Testing time-based* systems can be a real bitch. The
most annoying part is that the naive approach generally
involves tests waiting for the code under test to complete,
thus making the tests waste time just sitting there. When
your tests take too long to run, you think twice about
running them often which is inevitably a Bad Thing.

As with the mockfs, I have a simple mocktime working,
allowing me to quickly and easily test time-based behaviour
in threaded code. I suspect others have been here before,
and I'd like to stand on their shoulders, or at least
get a little piggyback ride for a bit.

Thanks again for any pointers to similar efforts.

-Peter

* By "time-based" I mean code that does things like time.sleep()
or time.time(), in essence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top