#10667 closed (fixed)
Test failure in regressiontests.templates.tests.Templates
Reported by: | Glenn Maynard | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Straightforward test failure in r10222 with 2.5:
====================================================================== ERROR: test_templates (regressiontests.templates.tests.Templates) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/glenn/django/tests/regressiontests/templates/tests.py", line 212, in test_templates exc_type, exc_value, exc_tb = sys.exc_info() NameError: global name 'sys' is not defined
Attachments (1)
Change History (8)
by , 16 years ago
Attachment: | fix-template-test.diff added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
except Exception: exc_type, exc_value, exc_tb = sys.exc_info() if exc_type != result: tb = '\n'.join(traceback.format_exception(exc_type, exc_value, exc_tb)) failures.append("Template test (TEMPLATE_STRING_IF_INVALID='%s'): %s -- FAILED. Got %s, exception: %s\n%s" % (invalid_str, name, exc_type, exc_value, tb)) continue
sys.exc_info is being used, and sys isn't being imported. Can you check:
- Is this code path being reached for you? (If not, something about this test has a nondeterministic code path, which is probably a bug.)
- If so, then where is the sys module being imported for you?
comment:3 by , 16 years ago
No it doesn't hit that code path for me, but sys is clearly used there and not imported so we should just add the import.
comment:4 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
This runs fine for me under 2.5. Can you provide some more details?