Webware / MiddleKit / Tests /

Full commit

This is just a convenience module for the various test modules (


import os, sys, time
import FixPath
import MiscUtils
import MiddleKit
from MiddleKit.Core.Klasses import Klasses

workDir = 'WorkDir'

def rmdir(dirname, shouldPrint=1):
    """Really remove the directory, even if it has files (and directories) in it."""
    if shouldPrint:
        print 'Removing %s...' % dirname
    if os.path.exists(dirname):
        exceptions = (os.curdir, os.pardir)
        for name in os.listdir(dirname):
            if name not in exceptions:
                fullName = os.path.join(dirname, name)
                if os.path.isdir(fullName):
                    rmdir(fullName, shouldPrint=0)

dbName = 'MySQL'
    # passed as a cmd line arg to, and used to find an object store module

storeArgs = {}
    # passed to the object store class

sqlCommand = 'mysql'
    # the database command used for feeding SQL to the database via stdin

sqlVersionCommand = 'mysql --version'
    # the database command used to get the version number of the SQL database

# override any of the preceding as needed by creating a
    from LocalConfig import *
except ImportError: