def test_missing_write(self): self.assertEqual( action_tracer.check_missing_writes( [], {"write-me.out"}, ), {"write-me.out"}, )
def test_fulfilled_write(self): self.assertEqual( action_tracer.check_missing_writes( [action_tracer.Write("compiled.o")], {"compiled.o"}, ), set(), )
def test_excess_write(self): self.assertEqual( action_tracer.check_missing_writes( [action_tracer.Write("side-effect.txt")], {}, ), {}, )
def test_only_reads(self): self.assertEqual( action_tracer.check_missing_writes( [action_tracer.Read("newspaper.pdf")], {}, ), {}, )
def test_deleted_then_written(self): self.assertEqual( action_tracer.check_missing_writes( [ action_tracer.Delete("compiled.o"), action_tracer.Write("compiled.o"), ], {"compiled.o"}, ), set(), )
def test_missing_and_fulfilled_write(self): self.assertEqual( action_tracer.check_missing_writes( [action_tracer.Write("compiled.o")], { "write-me.out", "compiled.o", }, ), {"write-me.out"}, )
def test_no_accesses(self): self.assertEqual( action_tracer.check_missing_writes([], {}), {}, )