Example #1
0
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))
Example #2
0
def test():
    with cd("/usr/bin/"):
        print(run("ls -l pyth*"))
Example #3
0
 def set_empty_cd():
     with cd():
         pass
Example #4
0
 def test_nested_popped(self):
     with cd("first"):
         with cd("second"):
             with cd("third"):
                 pass
         assert env.working_directory == ["first"]
Example #5
0
 def test_nested_cd(self):
     with cd("first"):
         with cd("second"):
             with cd("third"):
                 assert env.working_directory == ["first", "second", "third"]
Example #6
0
 def test_simple_cd(self):
     with cd("testdir"):
         assert env.working_directory == ["testdir"]