예제 #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))
예제 #2
0
파일: yarnfile.py 프로젝트: cdgriffith/Yarn
def test():
    with cd("/usr/bin/"):
        print(run("ls -l pyth*"))
예제 #3
0
 def set_empty_cd():
     with cd():
         pass
예제 #4
0
 def test_nested_popped(self):
     with cd("first"):
         with cd("second"):
             with cd("third"):
                 pass
         assert env.working_directory == ["first"]
예제 #5
0
 def test_nested_cd(self):
     with cd("first"):
         with cd("second"):
             with cd("third"):
                 assert env.working_directory == ["first", "second", "third"]
예제 #6
0
 def test_simple_cd(self):
     with cd("testdir"):
         assert env.working_directory == ["testdir"]