Django 4.1 TestLoader failures
jayvdb opened this issue · comments
New in Django 4.1, both tests for TestLoader
now fail.
[ 89s] =================================== FAILURES ===================================
[ 89s] _______________________________ TestLoader.test ________________________________
[ 89s]
[ 89s] self = <tests.test_django.TestLoader object at 0x7f14534eebb0>
[ 89s]
[ 90s] def test(self):
[ 90s] > bundles = self.loader.load_bundles()
[ 90s]
[ 90s] tests/test_django.py:192:
[ 90s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 90s] ../../BUILDROOT/python-django-assets-2.0-7.8.x86_64/usr/lib/python3.8/site-packages/django_assets/loaders.py:79: in load_bundles
[ 90s] bundles.extend(self.with_file(filename, self._parse) or [])
[ 90s] /usr/lib/python3.8/site-packages/webassets/loaders.py:333: in with_file
[ 90s] return then_run(filename, contents)
[ 90s] ../../BUILDROOT/python-django-assets-2.0-7.8.x86_64/usr/lib/python3.8/site-packages/django_assets/loaders.py:110: in _parse
[ 90s] for node in t: # don't move into _recurse_node, ``Template`` has a .nodelist attribute
[ 90s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 90s]
[ 90s] self = <Template template_string="b'\n {% l...">
[ 90s]
[ 90s] def __iter__(self):
[ 90s] for node in self.nodelist:
[ 90s] > yield from node
[ 90s] E TypeError: 'TextNode' object is not iterable
[ 90s]
[ 90s] /usr/lib/python3.8/site-packages/django/template/base.py:158: TypeError
[ 90s] ________________________ TestLoader.test_cached_loader _________________________
[ 90s]
[ 90s] self = <tests.test_django.TestLoader object at 0x7f14534ee730>
[ 90s]
[ 90s] def test_cached_loader(self):
[ 90s] settings.TEMPLATE_LOADERS = (
[ 90s] ('django.template.loaders.cached.Loader', (
[ 90s] 'django.template.loaders.filesystem.Loader',
[ 90s] )),
[ 90s] )
[ 90s] > bundles = self.loader.load_bundles()
[ 90s]
[ 90s] tests/test_django.py:202:
[ 90s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 90s] ../../BUILDROOT/python-django-assets-2.0-7.8.x86_64/usr/lib/python3.8/site-packages/django_assets/loaders.py:79: in load_bundles
[ 90s] bundles.extend(self.with_file(filename, self._parse) or [])
[ 90s] /usr/lib/python3.8/site-packages/webassets/loaders.py:333: in with_file
[ 90s] return then_run(filename, contents)
[ 90s] ../../BUILDROOT/python-django-assets-2.0-7.8.x86_64/usr/lib/python3.8/site-packages/django_assets/loaders.py:110: in _parse
[ 90s] for node in t: # don't move into _recurse_node, ``Template`` has a .nodelist attribute
[ 90s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 90s]
[ 90s] self = <Template template_string="b'\n {% l...">
[ 90s]
[ 90s] def __iter__(self):
[ 90s] for node in self.nodelist:
[ 90s] > yield from node
[ 90s] E TypeError: 'TextNode' object is not iterable
[ 90s]
[ 90s] /usr/lib/python3.8/site-packages/django/template/base.py:158: TypeError