def test_main_invalid_out(): with pytest.raises(SystemExit): main(['-o', None])
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)])
def test_main_create_out(tmpdir): main(['-o', os.path.join(str(tmpdir), 'does_not_exist')])
def test_main_invalid_in(tmpdir): with pytest.raises(SystemExit): main([os.path.join(str(tmpdir), 'does_not_exist')])
def test_main_no_model(): with pytest.raises(SystemExit): main(["/dev/null"])
def test_main_ok_merge(tmpdir): main([test_model, "-o", str(tmpdir), "-m"])
def test_main_ok_not_merge(tmpdir): main([test_model, "-o", str(tmpdir)])