class_docstr: Test Trial object and class.
docstr: Check property `Trial.compute_trial_hash(ignore_experiment=True)` is deprecated.
docstr_tok: ["Check","property","`","Trial.compute_trial_hash","(","ignore_experiment=True",")","`","is","deprecated","."]
code: def test_hash_ignore_experiment_is_deprecated(self, trial_config):
      """Check property `Trial.compute_trial_hash(ignore_experiment=True)` is deprecated."""
      trial_config["params"].append(
          {"name": "/max_epoch", "type": "fidelity", "value": "1"}
      )
      t1 = Trial(**trial_config)
      trial_config[
          "experiment"
      ] = "test"  # changing the experiment name
      t2 = Trial(**trial_config)
      with warnings.catch_warnings(record=True) as w:
          assert t1.hash_name == t2.hash_name
          assert t1.hash_params == t2.hash_params
          assert len(w) == 0
  
      with pytest.deprecated_call():
          assert Trial.compute_trial_hash(
              t1, ignore_experiment=False
          ) != Trial.compute_trial_hash(t2, ignore_experiment=False)
  
      with pytest.deprecated_call():
          assert Trial.compute_trial_hash(
              t1, ignore_experiment=True
          ) == Trial.compute_trial_hash(t2, ignore_experiment=True)
  
imports: import copy
  import datetime
  import os
  import warnings
  import bson
  import numpy
  import pytest
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 24 for calling the TestTrial obj's underlying member method code with example usage: obj.test_hash_ignore_experiment_is_deprecated(trial_config) without return types