Пример #1
0
def test_run():
    with tempdir():
        fn = modargs.function_for(dexy.commands, "dexy")
        args = modargs.determine_kwargs(fn)
        args['globals'] = []
        os.mkdir(args['logsdir'])
        c = Controller(args)
        c.config = SIMPLE_PY_CONFIG
        c.process_config()
        assert c.members.has_key("simple.py|py")
        assert isinstance(c.members["simple.py|py"], Document)
        assert sorted(c.batch_info().keys()) == ["args", "config", "docs"]
Пример #2
0
def test_docs_with_no_filters():
    with tempdir():
        fn = modargs.function_for(dexy.commands, "dexy")
        args = modargs.determine_kwargs(fn)
        args['globals'] = []
        os.mkdir(args['logsdir'])
        c = Controller(args)
        c.config = NO_FILTERS_CONFIG
        c.process_config()
        assert c.members.has_key("hello.txt")
        assert isinstance(c.members["hello.txt"], Document)
        assert sorted(c.batch_info().keys()) == [
                "args",
                "config",
                "docs",
                "elapsed",
                "finish_time",
                "id",
                "start_time",
                "timing"
                ]