Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 4.1 TestLoader failures #101

Open
jayvdb opened this issue Sep 18, 2022 · 0 comments
Open

Django 4.1 TestLoader failures #101

jayvdb opened this issue Sep 18, 2022 · 0 comments

Comments

@jayvdb
Copy link

jayvdb commented Sep 18, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant