Exemplo n.º 1
0
def action(args):
    if not (os.path.isdir(args.path)):
        raise ValueError("No such path: %s" % (args.path,))
    if args.nop:
        print summarize_workups(map(usable_workup, subdirs(args.path)))
    else:
        daily_summary(args.path)
    return 0
Exemplo n.º 2
0
def action(args):
    if not (os.path.isdir(args.path)):
        raise ValueError("No such path: %s" % (args.path, ))
    if args.nop:
        print summarize_workups(map(usable_workup, subdirs(args.path)))
    else:
        daily_summary(args.path)
    return 0
Exemplo n.º 3
0
def test_generate_daily_summary():
    if os.path.exists('daily/workups/2011-06-11/summary.html'):
        os.unlink('data/workups/2011-06-11/summary.html')
    daily_summary('data/workups/2011-06-11')
    s = os.path.exists('data/workups/2011-06-11/summary.html')
    assert s
Exemplo n.º 4
0
def test_generate_daily_summary():
    if os.path.exists('daily/workups/2011-06-11/summary.html'):
        os.unlink('data/workups/2011-06-11/summary.html')
    daily_summary('data/workups/2011-06-11')
    s = os.path.exists('data/workups/2011-06-11/summary.html')
    assert s