diff --git a/tests/panels/test_profiling.py b/tests/panels/test_profiling.py index ff613dfe1..10389f7bb 100644 --- a/tests/panels/test_profiling.py +++ b/tests/panels/test_profiling.py @@ -1,3 +1,6 @@ +import sys +import unittest + from django.contrib.auth.models import User from django.db import IntegrityError, transaction from django.http import HttpResponse @@ -50,6 +53,10 @@ def test_cum_time_threshold(self): self.assertNotIn("render", content) self.assertValidHTML(content) + @unittest.skipIf( + sys.version_info < (3, 12, 0), + "Python 3.12 no longer contains a frame for list comprehensions.", + ) def test_listcomp_escaped(self): self._get_response = lambda request: listcomp_view(request) response = self.panel.process_request(self.request)