-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# "Integration test" for Fabric to be run occasionally / before releasing. | ||
# Executes idempotent/nonthreatening commands against localhost by default. | ||
|
||
from __future__ import with_statement | ||
|
||
from fabric.api import * | ||
|
||
|
||
@hosts('localhost') | ||
def test(): | ||
flags = (True, False) | ||
funcs = (run, sudo) | ||
cmd = "ls /" | ||
line = "#" * 72 | ||
for shell in flags: | ||
for pty in flags: | ||
for combine_stderr in flags: | ||
for func in funcs: | ||
print(">>> %s(%s, shell=%s, pty=%s, combine_stderr=%s)" % ( | ||
func.func_name, cmd, shell, pty, combine_stderr)) | ||
print(line) | ||
func( | ||
cmd, | ||
shell=shell, | ||
pty=pty, | ||
combine_stderr=combine_stderr | ||
) | ||
print(line + "\n") |