

def test_update_example(self):
    ' The template formula should update a template when on_update is set '
    with open(os.path.join(self.temp_dir, 'in.txt'), 'w+') as fh:
        fh.write(UPDATE_TEMPLATE)
    self.environment.run_feature('update_example', 'sync')
    out_file = os.path.join(self.temp_dir, 'out.txt')
    assert os.path.exists(out_file)
    assert (open(out_file).read() == UPDATE_TEMPLATE)

dataset/ETHPy150Open toumorokoshi/sprinter/sprinter/formula/tests/test_template.py TestUnpackFormula.test_update_example/original