def METHOD_NAME(self):
    """
    Regression test for #4008
    https://github.com/DataDog/dd-trace-py/issues/4008
    """
    # pytest.mark.parametrize is not supported for unittest test methods
    cases = [
        ("custom-name", "custom-name"),
        (1, "1"),
        (u"😐", u"😐"),
    ]
    for template_name, expected in cases:
        t = jinja2.environment.Template("Hello {{name}}!")
        t.name = template_name
        assert "".join(t.generate(name="Jinja")) == "Hello Jinja!"
        # tests
        spans = self.pop_spans()
        assert len(spans) == 2
        render_span = spans[1]
        assert render_span.name == "jinja2.render"
        assert render_span.get_tag("jinja2.template_name") == expected
        assert render_span.get_tag("component") == "jinja2"
        assert render_span.resource == expected