          msg = "`DeprecatedMixin.old` is deprecated, use `new` instead."
          with self.assertWarnsMessage(DeprecationWarning, msg):
              deprecated.old()
  
  
  class DeprecationInstanceCheckTest(SimpleTestCase):
      def test_warning(self):
          class Manager(metaclass=DeprecationInstanceCheck):
              alternative = "fake.path.Foo"
 
</s>
    def test_removedafternextversionwarning_pending(self):
        self.assertTrue(
            issubclass(RemovedAfterNextVersionWarning, PendingDeprecationWarning)
        )

          msg = "`DeprecatedMixin.old` is deprecated, use `new` instead."
          with self.assertWarnsMessage(DeprecationWarning, msg):
              deprecated.old()
  
    def test_removedafternextversionwarning_pending(self):
        self.assertTrue(
            issubclass(RemovedAfterNextVersionWarning, PendingDeprecationWarning)
        )

  
  class DeprecationInstanceCheckTest(SimpleTestCase):
      def test_warning(self):
          class Manager(metaclass=DeprecationInstanceCheck):
              alternative = "fake.path.Foo"
keep keep keep add keep keep keep keep keep
 Fixed #33518 -- Added RemovedAfterNextVersionWarning.
tests/deprecation/tests.py