R"ddlZddlmZddlmZmZddlmZmZddl m Z ddl m Z m Z mZmZGddeZejedud Gd d e ZGd d eZejedudGdde ZGddeZejedudGddeZGddeZejedudGdde ZGddeZejedudGddeZGddeZedkrejd !dSdS)"N)TestCase)FakeScanDirModuleFakePathlib2Module)pathlib2scandir)FakeScandirTest)FakePathlibInitializationTest FakePathlibPathFileOperationTest!FakePathlibFileObjectPropertyTest!FakePathlibUsageInOsFunctionsTestceZdZdZejeduddZejeduddZ dS)DeprecationWarningTestc.|dSN) setUpPyfakefsselfs y/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyfakefs/tests/fake_legacy_modules_test.pysetUpzDeprecationWarningTest.setUps N$The scandir package is not installedcdt_|t5t jdddddS#1swxYwYdS)NF/)r has_warned assertWarnsDeprecationWarningrrs rtest_scandir_warningz+DeprecationWarningTest.test_scandir_warnings',$   0 1 1 ! ! OC  ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !A  A A %The pathlib2 package is not installedcdt_|t5t jdddddS#1swxYwYdS)NFz/foo)rrrrrPathrs rtest_pathlib2_warningz,DeprecationWarningTest.test_pathlib2_warning%s(-%   0 1 1 " " M& ! ! ! " " " " " " " " " " " " " " " " " "r) __name__ __module__ __qualname__runittestskipIfrrrr"rrrrsX_W_&LMM!!NM! X_X%'NOO""PO"""rrrceZdZdZdZdS)FakeScandirPackageTestcddlfd}|S)Nrchjj|Sr)fake_legacy_modulesr filesystemr)ppyfakefsrs r fake_scan_dirz:FakeScandirPackageTest.used_scandir..fake_scan_dir1s./AAgajj r)pyfakefs.fake_legacy_modules)rr1r0s` @r used_scandirz#FakeScandirPackageTest.used_scandir.s6++++       rc.tjddS)Nz2Path-like objects not available in scandir packager&skiprs rtest_path_likez%FakeScandirPackageTest.test_path_like8s JKKKKKrN)r#r$r%r3r7r(rrr*r*,s7LLLLLrr*ceZdZdZdZdS)RealScandirPackageTestcddlm}|S)Nrrr;)rrs rr3z#RealScandirPackageTest.used_scandir=s######rcdSNTr(rs r use_real_fsz"RealScandirPackageTest.use_real_fsBtrN)r#r$r%r3r>r(rrr9r9<s2 rr9rceZdZdZdS)FakePathlib2InitializationTestctSrrrs r used_pathlibz+FakePathlib2InitializationTest.used_pathlibHrNr#r$r%rDr(rrrArAF#rrAceZdZdZdS)RealPathlib2InitializationTestcdSr=r(rs rr>z*RealPathlib2InitializationTest.use_real_fsMr?rNr#r$r%r>r(rrrIrIL#rrIceZdZdZdS)"FakePathlib2FileObjectPropertyTestctSrrCrs rrDz/FakePathlib2FileObjectPropertyTest.used_pathlibSrErNrFr(rrrNrNQrGrrNceZdZdZdS)"RealPathlib2FileObjectPropertyTestcdSr=r(rs rr>z.RealPathlib2FileObjectPropertyTest.use_real_fsXr?rNrKr(rrrQrQWrLrrQceZdZdZdZdS)!FakePathlib2PathFileOperationTestctSrrCrs rrDz.FakePathlib2PathFileOperationTest.used_pathlib^rErc.tjddS)Nz%is_junction not available in pathlib2r5rs rtest_is_junctionz2FakePathlib2PathFileOperationTest.test_is_junctionas =>>>>>rN)r#r$r%rDrWr(rrrTrT\s2?????rrTceZdZdZdS)!RealPathlibPath2FileOperationTestcdSr=r(rs rr>z-RealPathlibPath2FileOperationTest.use_real_fsfr?rNrKr(rrrYrYerLrrYceZdZdZdS)"FakePathlib2UsageInOsFunctionsTestctSrrCrs rrDz/FakePathlib2UsageInOsFunctionsTest.used_pathliblrErNrFr(rrr\r\jrGrr\ceZdZdZdS)"RealPathlib2UsageInOsFunctionsTestcdSr=r(rs rr>z.RealPathlib2UsageInOsFunctionsTest.use_real_fsqr?rNrKr(rrr_r_prLrr___main__) verbosity)r&!pyfakefs.fake_filesystem_unittestrr2rrpyfakefs.legacy_packagesrrpyfakefs.tests.fake_os_testr pyfakefs.tests.fake_pathlib_testr r r r rr'r*r9rArIrNrQrTrYr\r_r#mainr(rrrisX666666NNNNNNNN66666666777777"""""X""""D"HII L L L L L_ L LJI L3T!#JKK%BLK %C T!#JKK)JLK )K T!#JKK?????(H??LK?(I T!#JKK)JLK )K  zHMAr