def test(): run("mkdir yarntesting") put(__file__, "yarntesting/testfile.py") with cd("yarntesting"): print(run("ls -1 *py")) run("echo $HOSTNAME >> {}".format(run("ls -1 *.py"))) get("yarntesting/testfile.py", "{}.testfile".format(env.host_string))
def test(): with cd("/usr/bin/"): print(run("ls -l pyth*"))
def set_empty_cd(): with cd(): pass
def test_nested_popped(self): with cd("first"): with cd("second"): with cd("third"): pass assert env.working_directory == ["first"]
def test_nested_cd(self): with cd("first"): with cd("second"): with cd("third"): assert env.working_directory == ["first", "second", "third"]
def test_simple_cd(self): with cd("testdir"): assert env.working_directory == ["testdir"]