Skip to content

Instantly share code, notes, and snippets.

@jorisvddonk
Created August 6, 2013 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorisvddonk/6162658 to your computer and use it in GitHub Desktop.
Save jorisvddonk/6162658 to your computer and use it in GitHub Desktop.
Fabric test case
from fabric.api import *
import fabric
import os
def test_func():
print "Fabric version: %s" % fabric.version.get_version()
with shell_env(foo="bar", baz="qux"):
# Echo the 'foo' and 'baz' environment variables:
if os.name == 'posix':
local("env | grep foo")
local("env | grep baz")
else: # Assume Windows
local("set foo")
local("set baz")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment