Exemplo n.º 1
0
def test_main_invalid_out():
    with pytest.raises(SystemExit):
        main(['-o', None])
Exemplo n.º 2
0
def test_main_zipfile(tmpdir):
    test_zipfile = shutil.make_archive(os.path.join(str(tmpdir), "test_model"),
                                       "zip",
                                       root_dir=test_model)
    main([test_zipfile, "-o", str(tmpdir)])
Exemplo n.º 3
0
def test_main_create_out(tmpdir):
    main(['-o', os.path.join(str(tmpdir), 'does_not_exist')])
Exemplo n.º 4
0
def test_main_invalid_in(tmpdir):
    with pytest.raises(SystemExit):
        main([os.path.join(str(tmpdir), 'does_not_exist')])
Exemplo n.º 5
0
def test_main_no_model():
    with pytest.raises(SystemExit):
        main(["/dev/null"])
Exemplo n.º 6
0
def test_main_ok_merge(tmpdir):
    main([test_model, "-o", str(tmpdir), "-m"])
Exemplo n.º 7
0
def test_main_ok_not_merge(tmpdir):
    main([test_model, "-o", str(tmpdir)])