o
    i                     @   s2   d Z ddlZddlZejdg ddd ZdS )zBTest factory import compatibility from original and new locations.    Nz*factory_name,original_module,compat_module))make_taggerspacy.pipeline.factorieszspacy.pipeline.tagger)make_sentencizerr   zspacy.pipeline.sentencizer)make_nerr   spacy.pipeline.ner)make_parserr   spacy.pipeline.dep_parser)make_tok2vecr   zspacy.pipeline.tok2vec)make_spancatr   spacy.pipeline.spancat)make_spancat_singlelabelr   r   )make_lemmatizerr   zspacy.pipeline.lemmatizer)make_entity_rulerr   zspacy.pipeline.entityruler)make_span_rulerr   zspacy.pipeline.span_ruler)make_edit_tree_lemmatizerr   z#spacy.pipeline.edit_tree_lemmatizer)make_attribute_rulerr   zspacy.pipeline.attributeruler)make_entity_linkerr   zspacy.pipeline.entity_linker)make_textcatr   zspacy.pipeline.textcat)make_token_splitterr   spacy.pipeline.functions)make_doc_cleanerr   r   )make_morphologizerr   zspacy.pipeline.morphologizer)make_senterr   zspacy.pipeline.senter)make_span_finderr   zspacy.pipeline.span_finder)make_multilabel_textcatr   z!spacy.pipeline.textcat_multilabel)make_beam_nerr   r   )make_beam_parserr   r   )make_nn_labellerr   zspacy.pipeline.multitaskc                 C   s   t |}t|| }|dusJ d|  d| t |}t|| }|dus0J d|  d| ||u sAJ d|  d| d| dS )z[Test that factory functions can be imported from both original and compatibility locations.NzCould not import z from zFactory z imported from z1 is not the same object as the one imported from )	importlibimport_modulegetattr)factory_nameoriginal_modulecompat_moduleoriginal_module_objoriginal_factorycompat_module_objcompat_factory r(   T/home/ubuntu/.local/lib/python3.10/site-packages/spacy/tests/test_factory_imports.py!test_factory_import_compatibility	   s   
;





r*   )__doc__r   pytestmarkparametrizer*   r(   r(   r(   r)   <module>   s   8