def METHOD_NAME(self):
    path = os.path.join(self.tmpdir, "foofile")
    self.assertFalse(os.path.exists(path))
    # Bad open mode
    self.assertRaises(ValueError, cr.CrFile, path, 86,
                      cr.GZ_COMPRESSION, None)
    self.assertFalse(os.path.exists(path))
    # Bad compression type
    self.assertRaises(ValueError, cr.CrFile, path,
                      cr.MODE_READ, 678, None)
    self.assertFalse(os.path.exists(path))
    # Bad contentstat object
    self.assertRaises(TypeError, cr.XmlFile, path,
                      cr.MODE_READ, cr.GZ_COMPRESSION, "foo")
    self.assertFalse(os.path.exists(path))
    # Non existing path
    self.assertRaises(IOError, cr.CrFile,
                      "foobar/foo/xxx/cvydmaticxuiowe")