예제 #1
0
def reset_command(
        artifactsdir=Wrapper.DEFAULT_ARTIFACTS_DIR, # location of directory in which to store artifacts
        logsdir=Wrapper.DEFAULT_LOG_DIR # location of directory in which to store logs
        ):
    """
    Empty the artifacts and logs directories.
    """
    wrapper = Wrapper(**locals())
    wrapper.load_config()
    wrapper.remove_dexy_dirs()
    wrapper.setup_dexy_dirs()
예제 #2
0
def test_wrapper_run():
    with tempdir():
        wrapper = Wrapper()
        wrapper.setup_dexy_dirs()
        d1 = Doc("abc.txt|outputabc", contents="these are the contents", wrapper=wrapper)
        d2 = Doc("hello.txt|outputabc", contents="these are more contents", wrapper=wrapper)
        assert d1.state == 'setup'
        assert d2.state == 'setup'
        wrapper.docs = [d1, d2]
        wrapper.run()
        assert d1.state == 'complete'
        assert d2.state == 'complete'
예제 #3
0
def test_wrapper_setup():
    with tempdir():
        assert not os.path.exists('artifacts')
        wrapper = Wrapper()
        wrapper.setup_dexy_dirs()
        assert os.path.exists('artifacts')