def METHOD_NAME(self):
    """Test as_handle with a string path argument."""
    p = self._path("test_file.fasta")
    mode = "wb"
    with File.as_handle(p, mode=mode) as handle:
        self.assertEqual(p, handle.name)
        self.assertEqual(mode, handle.mode)
        self.assertFalse(handle.closed)
    self.assertTrue(handle.closed)