def test_walked(): with tempdir(): with open("dexy.yaml", "w") as f: f.write("foo.txt") with open("foo.txt", "w") as f: f.write("foo") wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.to_valid() wrapper.to_walked() wrapper.validate_state('walked')
def test_walked(): with tempdir(): with open("dexy.yaml", "w") as f: f.write("foo.txt") with open("foo.txt", "w") as f: f.write("foo") wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.to_valid() wrapper.to_walked() wrapper.validate_state('walked')
def test_ran(): with tempdir(): with open("dexy.yaml", "w") as f: f.write("foo.txt") with open("foo.txt", "w") as f: f.write("foo") wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.run_from_new() for node in wrapper.roots: assert node.state == 'ran' wrapper.validate_state('ran') wrapper = Wrapper() wrapper.run_from_new() for node in wrapper.roots: assert node.state == 'consolidated' wrapper.validate_state('ran')
def test_ran(): with tempdir(): with open("dexy.yaml", "w") as f: f.write("foo.txt") with open("foo.txt", "w") as f: f.write("foo") wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.run_from_new() for node in wrapper.roots: assert node.state == 'ran' wrapper.validate_state('ran') wrapper = Wrapper() wrapper.run_from_new() for node in wrapper.roots: assert node.state == 'consolidated' wrapper.validate_state('ran')
def test_state_new_after_init(): wrapper = Wrapper() wrapper.validate_state('new')
def test_state_valid_after_to_valid(): with tempdir(): wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.to_valid() wrapper.validate_state('valid')
def test_state_new_after_init(): wrapper = Wrapper() wrapper.validate_state('new')
def test_state_valid_after_to_valid(): with tempdir(): wrapper = Wrapper() wrapper.create_dexy_dirs() wrapper.to_valid() wrapper.validate_state('valid')