Add this into your functional tests and smoke it.
import sys, random
def chaos_trace(frame, event, arg):
if event == 'line' and random.random() < 0.000001:
raise MemoryError()
return chaos_trace
sys.settrace(chaos_trace)
You will get some lovely random failures injected into your code. A great way to find bugs, and make sure your reasoning is sound in the face of CHAOS!
2 comments:
Insane. :)
I adore this. Going to see how this works with games in Python for sure!
Post a Comment