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