Ticket #32824: nodelist_render_test.py

File nodelist_render_test.py, 312 bytes (added by Keryn Knight, 3 years ago)

synthetic test for isolating just this method, with memory profiler etc

Line 
1from django.template.base import NodeList
2context = {}
3
4class FakeNode:
5 __slots__ = ()
6 def render_annotated(self, context):
7 return '1'
8
9
10
11nl = NodeList(FakeNode() for x in range(100_000))
12
13def render():
14 for x in range(10):
15 nl.render(context)
16
17if __name__ == '__main__':
18 render()
19
Back to Top