jbr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 8812991

gis: Disabled query counting test in `relatedapp` because of its brittleness (number of queries may depend on external factors).

  • Participants
  • Parent commits 10090df
  • Branches gis

Comments (0)

Files changed (1)

File django/contrib/gis/tests/relatedapp/

             self.assertAlmostEqual(ref.y, pnt.y, tol)
         # Turning on debug so we can manually verify the number of SQL queries issued.
-        dbg = settings.DEBUG
-        settings.DEBUG = True
+        # DISABLED: the number of queries count testing mechanism is way too brittle.
+        #dbg = settings.DEBUG
+        #settings.DEBUG = True
         from django.db import connection
         # Each city transformed to the SRID of their state plane coordinate system.
             # Doing this implicitly sets `select_related` select the location.
             qs = list(City.objects.filter(name=name).transform('location__point', srid))
             check_pnt(GEOSGeometry(wkt), qs[0].location.point) 
-        settings.DEBUG= dbg
+        #settings.DEBUG= dbg
         # Verifying the number of issued SQL queries.
-        self.assertEqual(nqueries, len(connection.queries))
+        #self.assertEqual(nqueries, len(connection.queries))
 def suite():
     s = unittest.TestSuite()