def test_download_invalid_parameter(): with pytest.raises(SystemExit): main() assert os.path.exists(tmp_file) os.remove(tmp_file)
def test_copy_invalid_parameter(): with pytest.raises(SystemExit): main() delete_from_oss(oss_endpoint, tmp_file)
def test_download(): main() assert os.path.exists(tmp_file) os.remove(tmp_file)
def test_delete_invalid_parameter(): with pytest.raises(SystemExit): main()
def test_copy(): main() delete_from_oss(oss_endpoint, tmp_file)
def test_exist_failed(): with pytest.raises(SystemExit): main()
def test_delete(): upload_to_oss(cur_file, oss_endpoint, tmp_file) main()
def test_upload_invalid_parameter(): with pytest.raises(SystemExit): main()
def test_exist(): main()
def test_upload(): main() delete_from_oss(oss_endpoint, tmp_file)
def test_config(): main()
def test_help(): with pytest.raises(SystemExit): main()
def test_command_fail_will_result_abnormal_exit(): with pytest.raises(SystemExit): main()
from oss_command.entrypoint import main if __name__ == '__main__': main()