'VfiddlZddlZddlmZddlmZmZejdZejdZ ejdZ ejdZ ejdd g d Z ejd Z ejd ZejdZejdZejdZejdZejddg dZejddddggddZejddg dZejddg dZejddg dZejdd g d!Zejddg d"Zejd#Zejd$efd%ZdS)&N) _get_option)Seriesoptionsct)z3A fixture providing the ExtensionDtype to validate.NotImplementedErrorNc:\PYTHON\DbComparer\venv\Lib\site-packages\pandas/tests/extension/conftest.pydtyper  r ct)z Length-100 array for this type. * data[0] and data[1] should both be non missing * data[0] and data[1] should not be equal rr r r datar  r cb|js"|jdkstj|dt)z Length-100 array in which all the elements are two. Call pytest.skip in your fixture if the dtype does not support divmod. mz is not a numeric dtype) _is_numerickindpytestskiprr s r data_for_twosrs<  7s!2!2  u555666 r ct)zLength-2 array with [NA, Valid]rr r r data_missingr-r r rr)paramsc:|jdkr|S|jdkr|SdS)z5Parametrized fixture giving 'data' and 'data_missing'rrNparam)requestrrs r all_datar 3s1} . ( ( ) (r cfd}|S)a  Generate many datasets. Parameters ---------- data : fixture implementing `data` Returns ------- Callable[[int], Generator]: A callable that takes a `count` argument and returns a generator yielding `count` datasets. c38Kt|D]}VdSN)range)count_rs r genzdata_repeated..genLs1u  AJJJJ  r r )rr's` r data_repeatedr(<s#  Jr ct)z Length-3 array with a known sort order. This should be three items [B, C, A] with A < B < C For boolean dtypes (for which there are only 2 values available), set B=C=True rr r r data_for_sortingr*Ss  r ct)z{ Length-3 array with a known sort order. This should be three items [B, NA, A] with A < B and NA missing. rr r r data_missing_for_sortingr,arr ctjS)z Binary operator for comparing NA values. Should return a function of two arguments that returns True if both arguments are (scalar) NA for your type. By default, uses ``operator.is_`` )operatoris_r r r na_cmpr0ls  <r c|jS)z The scalar missing value for this type. Default dtype.na_value. TODO: can be removed in 3.x (see https://github.com/pandas-dev/pandas/pull/54930) )na_valuers r r2r2ys  >r ct)z Data for factorization, grouping, and unique tests. Expected to be like [B, B, NA, NA, A, A, B, C] Where A < B < C and NA is missing. If a dtype has _is_boolean = True, i.e. only 2 unique non-NA entries, then set C=B. rr r r data_for_groupingr4s  r TFc|jS)z#Whether to box the data in a Seriesrrs r box_in_seriesr7s  =r cdSNr xs r r=!r c(dgt|zSr9)lenr;s r r=r=s1#A,r cBtdgt|zSr9)rr@r;s r r=r=s&!s1vv&&r c|Sr#r r;s r r=r=r>r )scalarlistseriesobject)ridsc|jS)z, Functions to test groupby.apply(). rr6s r groupby_apply_oprIs  =r c|jS)zU Boolean fixture to support Series and Series.to_frame() comparison testing. rr6s r as_framerK =r c|jS)zL Boolean fixture to support arr and Series(arr) comparison testing. rr6s r as_seriesrNrLr c|jS)zd Boolean fixture to support comparison testing of ExtensionDtype array and numpy array. rr6s r use_numpyrP =r ffillbfillc|jS)z{ Parametrized fixture giving method parameters 'ffill' and 'bfill' for Series.fillna(method=) testing. rr6s r fillna_methodrUrQr c|jS)zR Boolean fixture to support ExtensionDtype _from_sequence method testing. rr6s r as_arrayrWrLr c@ttS)z A scalar that *cannot* be held by this ExtensionArray. The default should work for most subclasses, but is not guaranteed. If the array can hold any item (i.e. object dtype), then use pytest.skip. )rF__new__)rs r invalid_scalarrZs >>& ! !!r returncRtjjduotdddkS)z7 Fixture to check if Copy-on-Write is enabled. Tzmode.data_manager)silentblock)rmode copy_on_writerr r r using_copy_on_writeras2  "d* E +D 9 9 9W Dr )r.rpandas._config.configrpandasrrfixturer rrrr r(r*r,r0r2r4r7rIrKrNrPrUrWrZboolrar r r rfse ------      /00010,         e}%%%&%  &&   /..e}%%%&%e}%%%&%e}%%%&%)***+*e}%%%&%"""Tr