summaryrefslogtreecommitdiff
blob: 69a5558da31b053b72ec0d63a4534b8e93fb6ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/tests/panels/test_profiling.py	2023-12-30 20:02:22.263807899 +0100
+++ b/tests/panels/test_profiling.py	2023-12-30 20:03:44.655458186 +0100
@@ -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 @@
         self.assertNotIn("render", content)
         self.assertValidHTML(content)
 
+    @unittest.skipUnless(
+        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)