title: unittests for infinite loop
body: <p>I am stucked at this code for creating unittest for infinite loop.</p>
  
  <pre><code>try:
    while True:
      time.sleep(60)
  except:
    fun()
  </code></pre>
  
  <p>Please let me know how can we create unittests for infinite loop?</p>