'Register a collation, then deregister it. Make sure an error is raised if we try
to use it.'

def CheckDeregisterCollation(self):

    con = sqlite.connect(':memory:')
    con.create_collation('mycoll', cmp)
    con.create_collation('mycoll', None)
    try:
        con.execute("select    'a'    as    x    union    select    'b'    as    x    order    by    x    collate    mycoll")
        self.fail('should    have    raised    an    OperationalError')
    except sqlite.OperationalError as e:
        if (not e.args[0].startswith('no    such    collation    sequence')):
            self.fail('wrong    OperationalError    raised')
