fabtest.py

j pittman, 02/10/2010 04:06 PM

Download (441 Bytes)

 
1
from fabric.api import *
2
3
#enable debug output
4
output['debug'] = True
5
env.warn_only = True
6
7
directory = "/tmp"
8
cmd = "ls"
9
10
def test1():
11
    with path(directory):
12
        run(cmd)
13
14
def test2():
15
    run(cmd)
16
17
def test3():
18
    local(cmd, capture=False)
19
20
def test4():
21
    with path(directory):
22
        local(cmd, capture=False)
23
24
def tests():
25
    test1()
26
    test2()
27
    test3()
28
    test4()
29
    env.shell = "/bin/tcsh -c"
30
    test1()
31
    test2()