class_docstr: Tests worker.
class_docstr_tok: ["Tests","worker","."]
code: def test_podannotations_precedence(
      self, globalScope, localScope, precedence
  ):
      docs = render_chart(
          values={
              "airflowPodAnnotations": globalScope,
              "workers": localScope,
          },
          show_only=["templates/workers/worker-deployment.yaml"],
      )
      if precedence:
          assert (
              jmespath.search(
                  "spec.template.metadata.annotations", docs[0]
              )["scope"]
              == precedence
          )
      else:
          assert (
              jmespath.search(
                  "spec.template.metadata.annotations.scope", docs[0]
              )
              is None
          )
  
imports: from __future__ import annotations
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
  from tests.charts.log_groomer import LogGroomerTestBase
label_desc: Use image node_id 38 for calling the TestWorker obj's underlying member method code with example usage: obj.test_podannotations_precedence(globalScope, localScope, precedence) without return types