From: Ben Darnell Date: Sat, 11 Jun 2011 19:33:34 +0000 (-0700) Subject: Give template-generated code a fake "filename" to avoid confusing code-coverage tools X-Git-Tag: v2.0.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=482ccefa8599f438aca77c7edb659d83865e9f61;p=thirdparty%2Ftornado.git Give template-generated code a fake "filename" to avoid confusing code-coverage tools --- diff --git a/tornado/template.py b/tornado/template.py index 648621ed0..186a466c4 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -115,7 +115,8 @@ class Template(object): self.file = _File(_parse(reader, self)) self.code = self._generate_python(loader, compress_whitespace) try: - self.compiled = compile(self.code, self.name, "exec") + self.compiled = compile(self.code, "