gL idZddlmZddlmZddlZddlZddlm Z ddl m Z ddl m Z ddlmZerddl Zd Zej$d Zej$d Zej$d Zej$d Zej$dZej$dZej$dZGddej4ZdZy)aj This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal tweaks should be applied to get the tests passing (by overwriting a parent method). Additional tests should either be added to one of the BaseExtensionTests classes (if they are relevant for the extension interface for all dtypes), or be added to the array-specific tests in `pandas/tests/arrays/`. ) annotations) TYPE_CHECKINGN IntervalDtype)Interval) IntervalArray)basecBd}tjjdj|j }|tjjdj|z}t ||Dcgc]\}}t ||c}}Scc}}w)Nd)size)nprandom default_rnguniformcumsumzipr)N left_array right_arrayleftrights j/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/tests/extension/test_interval.py make_datar!s A&&q)11q19@@BJryy44Q7??Q?GGK58[5Q RkdEHT5 ! RR RsBctSNrrdtyper(s ?rc(ttS)z*Length-100 PeriodArray for semantics test.)rrrrrdatar!-s  %%rc0tjddgS)zLength 2 array with [NA, Valid]Nrr from_tuplesrrr data_missingr'3s  $ $dF^ 44rc.tjdy)NzInterval is not a numeric dtype)pytestskiprrr data_for_twosr+9s KK12rc0tjgdS)N)r$r r r#r%rrrdata_for_sortingr0>s  $ $%= >>rc0tjgdS)N)r-Nr#r%rrrdata_missing_for_sortingr2Cs  $ $%; <z pd.Seriesr?strreturnbool)__name__ __module__ __qualname__ TypeError divmod_excr@r)markxfailrDfilterwarningsrGrJ parametrizerOrR __classcell__)rEs@rr9r9PsJ) [[1: : [[A.. [[A>> [[A [[XX7585 [[A&&rr9cd}tjt|5|jddgdddy#1swYyxYw)Nz=can only insert Interval objects and NA into an IntervalArray)matchr$)r)raisesrYfillna)r'msgs rtest_fillna_non_scalar_raisesrexs< IC y ,$QF#$$$s ;A)__doc__ __future__rtypingrnumpyrr)pandas.core.dtypes.dtypesrpandasrpandas.core.arraysrpandas.tests.extensionr pdrfixturerr!r'r+r0r2r7ExtensionTestsr9rerrrrqs#  3,'S&& 55 33??==EE$&++$&P$r