Skip to content

Instantly share code, notes, and snippets.

@jkp
Created March 6, 2012 14:27
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 jkp/1986555 to your computer and use it in GitHub Desktop.
Save jkp/1986555 to your computer and use it in GitHub Desktop.
from sniffer.api import *
import os, termstyle
import subprocess
# you can customize the pass/fail colors like this
pass_fg_color = termstyle.green
pass_bg_color = termstyle.bg_default
fail_fg_color = termstyle.red
fail_bg_color = termstyle.bg_default
# This gets invoked for verification. This is ideal for running tests of some sort.
# For anything you want to get constantly reloaded, do an import in the function.
#
# sys.argv[0] and any arguments passed via -x prefix will be sent to this function as
# it's arguments. The function should return logically True if the validation passed
# and logicially False if it fails.
#
# This example simply runs nose.
@runnable
def execute_nose(*args):
return subprocess.call("nosetests") == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment