"""

Actions.py

Objects which encode the change to make to a given test.  Right now
this is limited to updating the ref file, but perhaps I will add more
types of actions later.

"""

class UpdateRefAction:

    def __init__ (self, test):

        self.test = test
        self.character = "U"

        pass

    def execute (self):
        outbytes = self.test.out_path.bytes ()
        self.test.ref_path.write_bytes (outbytes)
        pass

    def __str__ (self):
        return "update ref file %s from out file" % self.test.ref_path
                              
    pass
