              ]}
  
  
  class TestValidateMethod:
      def test_non_field_error_validate_method(self):
          class ExampleSerializer(serializers.Serializer):
              char = serializers.CharField()
 
</s>
    @pytest.mark.skipif(
        sys.version_info < (3, 7),
        reason="subscriptable classes requires Python 3.7 or higher",
    )
    def test_serializer_is_subscriptable(self):
        assert serializers.Serializer is serializers.Serializer["foo"]

              ]}
  
    @pytest.mark.skipif(
        sys.version_info < (3, 7),
        reason="subscriptable classes requires Python 3.7 or higher",
    )
    def test_serializer_is_subscriptable(self):
        assert serializers.Serializer is serializers.Serializer["foo"]

  
  class TestValidateMethod:
      def test_non_field_error_validate_method(self):
          class ExampleSerializer(serializers.Serializer):
              char = serializers.CharField()
keep add keep keep keep keep keep
 Allow type checkers to make serializers generic (#7385)
tests/test_serializer.py