示例#1
0
def fixture():
    init.default_pip_conf = f'{tests.src_path}/../pip.conf'
    utils.clean(tests.src_path)
    test_init.Core(prj_name='prj_name').run_test(answer=None, agree='y', folders=[])
    methods.kill(src_path=tests.src_path)
    methods.run(src_path=tests.src_path, mode=mode)
    methods.kill(src_path=tests.src_path)
    yield
    methods.kill(src_path=tests.src_path)
    utils.clean(tests.src_path)
示例#2
0
def test_already_works():
    methods.run(src_path=tests.src_path, mode=mode)
    assert_status(methods.codes.items(), init.DockerCompose.Started)
    methods.run(src_path=tests.src_path, mode=mode)
    assert_status(methods.codes.items(), init.DockerCompose.AlreadyWorks)
示例#3
0
def test_rerun():
    methods.run(src_path=tests.src_path, mode=mode)
    assert_status(methods.codes.items(), init.DockerCompose.Started)
    methods.kill(src_path=tests.src_path)
    methods.run(src_path=tests.src_path, mode=mode)
    assert_status(methods.codes.items(), init.DockerCompose.Started)
示例#4
0
def test_started():
    methods.run(src_path=tests.src_path, mode=mode, build=build)
    assert_status(methods.codes.items(), init.DockerCompose.Started)