code: def test_report_with_bad_objective(monkeypatch, fct):
      """Test report helper functions with bad objective types"""
      with OrionState() as cfg:
          monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__)))
  
          user_args = ["-x~uniform(-50, 50, precision=5)"]
  
          with pytest.raises(InvalidResult) as exc:
              orion.core.cli.main(
                  [
                      "hunt",
                      "--config",
                      "./orion_config.yaml",
                      "--exp-max-trials",
                      "2",
                      "--worker-trials",
                      "2",
                      "python",
                      "black_box.py",
                      fct,
                      "--objective",
                      "oh oh",
                  ]
                  + user_args
              )
  
          assert (
              "must contain a type `objective` with type float/int"
              in str(exc.value)
          )
  
file_path: orion/tests/functional/client/test_cli_client.py
imports: import os
  import pytest
  import orion.core.cli
  from orion.core.utils.exceptions import InvalidResult
  from orion.core.worker.consumer import Consumer
  from orion.testing import OrionState
label_desc: Use image node_id 5 for calling a global function with example usage: test_report_with_bad_objective(monkeypatch, fct) without return types