gL iVddlZddlZddlZddlZddlZddlmZmZmZm Z ddl m cm Z ddlmcmZddlmZej(dZej(dZej(dZej(dZej(dZej(d Zej(d Zej(d Zej(d Zej(d Zej(dZej(dZ ej(dZ!ddddddddddejDde jFdejDde jFdg Z$ej(e$dd d!Z%ej(e$ d"Z&y)#N)is_ci_environmentis_platform_armis_platform_macis_platform_windowsread_csvcrtjjDcic]\}}|| c}}Scc}}wN)icomextension_to_compressionitems)keyvalues ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/tests/io/conftest.pycompression_to_extensionrs-)-)F)F)L)L)N O:3E3J OO Os 3c|ddddS)zPath to the tips datasetiodatacsvtips.csvdatapaths r tips_filers D&% 44c|ddddS)zPath to a JSONL datasetrparserr items.jsonlrrs r jsonl_filers D(FM ::rc.t|dddddS)z#DataFrame with the salaries datasetrrrz salaries.csv )seprrs rsalaries_tabler#%s HT8V^D$ OOrc|ddddS)Nrrfeatherzfeather-0_3_1.featherrrs r feather_filer&+s D&)-D EErc|ddddS)Nrrxml books.xmlrrs rxml_filer*0s D&% 55rc#Ktjdtjd|jdd|jddtr9t st s t rtjdydytjd }tjd tjd |d k(rd n|jd}d|}d|d}tjtjd|tjtj5}d}|dkDr@ |j|}|jrn! |dz}t#j$d|dkDr@||j'dddy#t $rYHwxYw#1swYyxYww)z Fixture for mocking S3 interaction. Sets up moto server in separate process locally Return url for motoserver/moto CI service s3fsboto3AWS_ACCESS_KEY_ID foobar_keyAWS_SECRET_ACCESS_KEY foobar_secretzJS3 tests do not have a corresponding service on Windows or macOS platformszhttp://localhost:5000requestsmotoflaskmaster5gw555zhttp://127.0.0.1:/zmoto_server s3 -p )stdoutstderrrg?N)pytest importorskipsetenvrrrrskiplstrip subprocessPopenshlexsplitDEVNULLgetok Exceptiontimesleep terminate) worker_id monkeypatchr2 endpoint_port endpoint_uriproctimeoutrs rs3_baserT5s   *L9.@   15H5J KK-  * )&&z2F#G$ %0Ci6F6Ft6L i[) *=/;    KK,]O< =%%%%  GA+ \2Att3 3A+  NN %  !  sHD>GF4 F%&!F4F4 G% F1.F40F11F44F=9Gcdd|iiS)N client_kwargs endpoint_urlr)rTs rs3sorXss ng6 77rc4ddl}|jd|}|S)Nrs3)rW)r-resource)rTr-rZs r s3_resourcer\xs 7 3B Irc#K|jdtj}|j||jj |j yw)Nz pandas-test-Bucketuuiduuid4createobjectsdeleter\buckets rs3_public_bucketrgsJ   ,tzz|n = >F MMO L NN MMOsA&A(cd|fd|fd|dzfd|dzfd|fd|fd |fg}|D]-\}}t|d 5}|j|| d d d /|S#1swY;xYw zw The following datasets are loaded. - tips.csv - tips.csv.gz - tips.csv.bz2 - items.jsonl z tips#1.csvrz tips.csv.gz.gzz tips.csv.bz2.bz2rzsimple_dataset.featherr)rb)KeyBodyNopen put_object) rgrrr&r* test_s3_filess3_key file_namefs rs3_public_bucket_with_datarvs y! Y  E)* V+,  # !<0 hM+< )T " F MMiM L NN MMOsA(A*cd|fd|fd|dzfd|dzfd|fd|fd |fg}|D]-\}}t|d 5}|j|| d d d /|S#1swY;xYwriro) r{rrr&r*rrrsrtrus rs3_private_bucket_with_datar}s y! Y  E)* V+,  # !<0 hM+= )T " =a  ( (V! ( < = ==  = =rw)z .no_compressN)N)rjgzip)z.GZr)rkbz2)z.BZ2r)z.zipzip)z.ZIPr)z.xzxz)z.XZr)z.zstzstd zstandard)marks)z.ZSTr)paramsc|jSr paramrequests rcompression_formatrs ==rc |jdS)Nrrrs rcompression_extrs == r)'rDrBrJr`r= pandas.compatrrrrpandas.util._test_decoratorsutil_test_decoratorstdpandas.io.commonrcommonr pandas.io.parsersrfixturerrrr#r&r*rTrXr\rgrvr{r}r skip_if_no_compression_formats_paramsrrrrrrs   *)&PP55 ;; PP FF66::z8868FLL!{)CDFLL!{)CD  212678234r