new_contents: import helpers
  import stagpy
  from stagpy import conf
  import stagpy.misc
  
  def test_out_name_conf():
      oname = 'something_fancy'
      conf.core.outname = oname
      stem = 'teapot'
      assert stagpy.misc.out_name(stem) == oname + '_' + stem
      del conf.core.outname
  
  def test_out_name_number():
      assert stagpy.misc.out_name('T', 123) == 'stagpy_T00123'
  
  def test_baredoc():
      """
         Badly formatted docstring .. .
  
      With some content.
  
      """
      expected = 'Badly formatted docstring'
      assert stagpy.misc.baredoc(test_baredoc) == expected
  
  def test_fmttime():
      expected = r'$t=1.00 \times 10^{-1}$'
      assert stagpy.misc.fmttime(0.1) == expected
  
  def test_list_of_vars():
      expected = [[['a', 'b'], ['c', 'd', 'e']], [['f', 'g'], ['h']]]
      assert stagpy.misc.list_of_vars('a,b..c,d,,,e_f,g.h_,..,_')
  
  def test_set_of_vars():
      expected = set(iter('abcdefgh'))
      lovs = [[['a', 'b'], ['c', 'd', 'e']], [['f', 'g'], ['h']]]
      assert stagpy.misc.set_of_vars(lovs) == expected
  
subject: Add tests of stagpy.misc