          self.assertEqual(w.as_sql(compiler, connection), ('(dummy AND dummy)', []))
          w.negate()
          self.assertEqual(w.as_sql(compiler, connection), ('NOT (dummy AND dummy)', []))
          w = WhereNode(children=[NothingNode(), self.DummyNode()])
          self.assertRaises(EmptyResultSet, w.as_sql, compiler, connection)
          w.negate()
          self.assertEqual(w.as_sql(compiler, connection), ('', []))
  
      def test_empty_full_handling_disjunction(self):
          compiler = WhereNodeTest.MockCompiler()
 
</s> remove         self.assertRaises(EmptyResultSet, w.as_sql, compiler, connection)
 </s> add         with self.assertRaises(EmptyResultSet):
            w.as_sql(compiler, connection) </s> remove         self.assertRaises(EmptyResultSet, w.as_sql, compiler, connection)
 </s> add         with self.assertRaises(EmptyResultSet):
            w.as_sql(compiler, connection) </s> remove         self.assertRaises(ValueError, test)
 </s> add         with self.assertRaises(ValueError):
            test() </s> remove         self.assertRaises(signing.BadSignature,
            request.get_signed_cookie, 'c')
 </s> add         with self.assertRaises(signing.BadSignature):
            request.get_signed_cookie('c') </s> remove         self.assertRaises(KeyError, q.__getitem__, "foo")
 </s> add         with self.assertRaises(KeyError):
            q.__getitem__("foo")
        with self.assertRaises(EmptyResultSet):
            w.as_sql(compiler, connection)
          self.assertEqual(w.as_sql(compiler, connection), ('(dummy AND dummy)', []))
          w.negate()
          self.assertEqual(w.as_sql(compiler, connection), ('NOT (dummy AND dummy)', []))
          w = WhereNode(children=[NothingNode(), self.DummyNode()])
        with self.assertRaises(EmptyResultSet):
            w.as_sql(compiler, connection)
          w.negate()
          self.assertEqual(w.as_sql(compiler, connection), ('', []))
  
      def test_empty_full_handling_disjunction(self):
          compiler = WhereNodeTest.MockCompiler()
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/queries/tests.py