old_contents: #!/usr/bin/python
  import unittest
  import RMF
  import shutil
  
  class GenericTest(unittest.TestCase):
      def _show(self, g):
          for i in range(0, g.get_number_of_children()):
              print i, g.get_child_name(i), g.get_child_is_group(i)
      """Test the python code"""
      def test_perturbed(self):
          """Test closing an RMF file"""
          for suffix in ["rmf", "rmf2"]:
              f= RMF.create_rmf_file(RMF._get_temporary_file_path("test_file."+suffix))
              r= f.get_root_node()
              print r.get_type()
              sc= f.get_category("sequence")
              ik= f.get_int_key(sc, "ik0")
              f.set_current_frame(0)
              r.set_value(ik, 1)
              del r
              del f
              del ik
              del sc
              names= RMF.get_open_hdf5_handle_names()
              print names
              self.assertEqual(len(names), 0)
  
  if __name__ == '__main__':
      unittest.main()
  
new_contents: #!/usr/bin/python
  import unittest
  import RMF
  import shutil
  
  class Tests(unittest.TestCase):
      def _show(self, g):
          for i in range(0, g.get_number_of_children()):
              print i, g.get_child_name(i), g.get_child_is_group(i)
      """Test the python code"""
      def test_perturbed(self):
          """Test closing an RMF file"""
          for suffix in ["rmf", "rmf2"]:
              f= RMF.create_rmf_file(RMF._get_temporary_file_path("test_file."+suffix))
              r= f.get_root_node()
              print r.get_type()
              sc= f.get_category("sequence")
              ik= f.get_int_key(sc, "ik0")
              f.set_current_frame(0)
              r.set_value(ik, 1)
              del r
              del f
              del ik
              del sc
              names= RMF.get_open_hdf5_handle_names()
              print names
              self.assertEqual(len(names), 0)
      def test_perturbed_2(self):
          """Test reopening an RMF file"""
          for suffix in ["rmf", "rmf2"]:
              name=RMF._get_temporary_file_path("test_file."+suffix)
              print name
              f= RMF.create_rmf_file(name)
              r= f.get_root_node()
              print r.get_type()
              sc= f.get_category("sequence")
              ik= f.get_int_key(sc, "ik0")
              f.set_current_frame(0)
              r.set_value(ik, 1)
              del f
              del r
  
              f= RMF.open_rmf_file_read_only(name)
              r= f.get_root_node()
              print r.get_type()
              sc= f.get_category("sequence")
              ik= f.get_int_key(sc, "ik0")
              f.set_current_frame(0)
              self.assertEqual(r.get_value(ik), 1)
  
  
  if __name__ == '__main__':
      unittest.main()
  
subject: check that files are written