




import warnings

from ...utils import logging
from .image_processing_owlvit import OwlViTImageProcessor


UpperCAmelCase_									=	logging.get_logger(__name__)





class     lowerCamelCase__(					__lowerCamelCase):
      def __init__(				self: int    ,       *UpperCamelCase_: Optional[Any]    ,       **UpperCamelCase_: Optional[int]   ):
             warnings.warn(
                 """The class OwlViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
                 """ use OwlViTImageProcessor instead."""    ,       UpperCamelCase_    ,       )
             super().__init__(*UpperCamelCase_    ,       **UpperCamelCase_   )







from transformers import DistilBertTokenizer, DistilBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow

from ..bert.test_tokenization_bert import BertTokenizationTest





@require_tokenizers
class     lowerCamelCase__(					__lowerCamelCase):
      UpperCAmelCase__      :	Dict    		=   DistilBertTokenizer
      UpperCAmelCase__      :	Dict    		=   DistilBertTokenizerFast
      UpperCAmelCase__      :	Tuple    		=   True
      @slow
      def 			lowerCAmelCase__						(				self: Tuple   ):
             __lowerCamelCase   =						DistilBertTokenizer.from_pretrained("""distilbert-base-uncased"""   )

             __lowerCamelCase   =						tokenizer.encode("""sequence builders"""    ,       add_special_tokens=UpperCamelCase_   )
             __lowerCamelCase   =						tokenizer.encode("""multi-sequence build"""    ,       add_special_tokens=UpperCamelCase_   )

             __lowerCamelCase   =						tokenizer.build_inputs_with_special_tokens(UpperCamelCase_   )
             __lowerCamelCase   =						tokenizer.build_inputs_with_special_tokens(UpperCamelCase_    ,       UpperCamelCase_   )

             assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
             assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
                 tokenizer.sep_token_id
             ]

