def test_OpenFile(self):
   fb = fa._FileBase(self.filename)
   fb._OpenFile()
   self.assertIsNotNone(fb._fh)
   self.assertTrue(len(fb._fh.readline()) > 0)
   fb._fh.close()
 def test_CloseFile(self):
   fb = fa._FileBase(self.filename)
   fb._OpenFile()
   fb._CloseFile()
   self.assertIsNone(fb._fh)
 def test_constructor(self):
   fb = fa._FileBase(self.filename)
   self.assertEqual(fb._filename, self.filename)
   self.assertEqual(fb._colnames, self.colnames)
   self.assertRaises(fa.FileError, fa._FileBase, 'invalid file')