def test_existingfile(self):
    'Test the value-type interface for existing files.'
    self.assertTrue(isinstance(test_init_file, ExistingFile))
    self.assertFalse(isinstance(example_dir, ExistingFile))
    self.assertTrue((ExistingFile(test_init_file) == test_init_file))
    self.assertRaises(TypeError, ExistingFile, 12)
    self.assertRaises(IOError, ExistingFile, 'wargarbl')
    self.assertRaises(IOError, ExistingFile, nonexistant_dir)
Test the value-type interface for existing files.
def test_existingfile(self):
    
    self.assertTrue(isinstance(test_init_file, ExistingFile))
    self.assertFalse(isinstance(example_dir, ExistingFile))
    self.assertTrue((ExistingFile(test_init_file) == test_init_file))
    self.assertRaises(TypeError, ExistingFile, 12)
    self.assertRaises(IOError, ExistingFile, 'wargarbl')
    self.assertRaises(IOError, ExistingFile, nonexistant_dir)