Exemple #1
0
    _cleanup ()
    
    r = TextTestRunner ()
    r.run (full)
    
    return

def fileeq(a, b):
    for f in a, b:
        if not os.path.exists (f):
            assert False, 'cannot diff %s and %s: %s does not exist' % (
                repr (a), repr (b), repr (f))
            
    if open (a).read () == open (b).read (): return

    os.system ("diff '%s' '%s'" % (a, b))
    assert False, '%s and %s differ' % (a, b)

basedir = os.path.dirname(os.path.abspath(__file__))
init_logging(',,pyblio.log')
_count = 0

def src(*name):
    return os.path.join(basedir, *name)

def dbname ():
    global _count
    _count = _count + 1
    return ',,db-%d' % _count

Exemple #2
0
		
# ---------- Initialisation

if not quiet:
	print_version ()
	copyright ()
	print _("Useful commands:\n	help     to get some help\n	quit     to quit\n").encode (charset)

# ---------- Load default schemas, set logging
from Pyblio import Registry
Registry.load_default_settings()

from Pyblio import init_logging
import logging

init_logging(os.path.join(homedir, 'log'))
logging.getLogger('pyblio').setLevel(logging.DEBUG)

# ---------- Lire les fichiers de conf

user_global = {'__builtins__' : __builtins__,
	       '__name__'     : progname,
	       }

user_local  = {}


# Fichiers standards
for filename in sources:
	try:
		os.stat (filename)