# Path: rapprentice/colorize.py
# def colorize(string, color, bold=False, highlight = False):
#     attr = []
#     num = color2num[color]
#     if highlight: num += 10
#     attr.append(str(num))
#     if bold: attr.append('1')
#     return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)


import sys, traceback
from time import time
from rapprentice.colorize import colorize

TEST_FUNCS = {}


def testme(func):    
    TEST_FUNCS[func.__name__] = func
    return func
def test_all(stop=False):
    nPass,nFail = 0,0
    for (name,func) in TEST_FUNCS.items():
        print colorize("function: %s"%name,"green")
        try:
            t_start = time()
            func()
            t_elapsed = time() - t_start

# Path: rapprentice/colorize.py
# def colorize(string, color, bold=False, highlight = False):
#     attr = []
#     num = color2num[color]
#     if highlight: num += 10
#     attr.append(str(num))
#     if bold: attr.append('1')
#     return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)


# Path: rapprentice/testing.py
import sys, traceback
from time import time
from rapprentice.colorize import colorize


TEST_FUNCS = {}


def testme(func):    
    TEST_FUNCS[func.__name__] = func
    return func
def test_all(stop=False):
    nPass,nFail = 0,0
    for (name,func) in TEST_FUNCS.items():
        print colorize("function: %s"%name,"green")
        try:
            t_start = time()
            func()
            t_elapsed = time() - t_start

            print colorize("PASSED (%.3f sec)"%t_elapsed,"blue")