Ԃ_ v d Z ddlZddlZddlmZ ddlmZ ddlZd Z d Z d Zd Zd Z d Zd Zd Zd Zd ZdS )z?Tests that the pytest plugin properly provides the "fs" fixture N)OSType)Pausec r | d t j d sJ d S N/var/data/xx1.txtcreate_fileospathexistsfss z/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyfakefs/pytest_tests/pytest_plugin_test.pytest_fs_fixturer s6 NN&''' 7>>-....... c r | d t j d sJ d S r r )fake_filesystems r test_fs_fixture_aliasr s8 3444 7>>-.......r c | d | d t j d sJ t j d sJ | |k sJ d S )Nr z/var/data/xx2.txtr )r r s r test_both_fixturesr sw 3444NN&''' 7>>-..... 7>>-..... r c t j }| |j sJ t j |j sJ | | |j sJ t j |j rJ t j }| |j rJ t j |j sJ | t j |j rJ t j |j sJ d S N)tempfileNamedTemporaryFiler namer r pauseresumer fake_temp_filereal_temp_files r test_pause_resumer! s 022N 99^())))) 7>>.-.....HHJJJ 99^()))))w~~n122222022Nyy,----- 7>>.-.....IIKKKw~~n122222 7>>.-.......r c t j }| |j sJ t j |j sJ t | 5 | |j sJ t j |j rJ t j }| |j rJ t j |j sJ d d d n# 1 swxY w Y t j |j rJ t j |j sJ d S r )r r r r r r r r s r test_pause_resume_contextmanagerr# , sl 022N 99^())))) 7>>.-..... r 3 3yy,-----7>>."566666!46699^011111w~~n12222223 3 3 3 3 3 3 3 3 3 3 3 3 3 3 w~~n122222 7>>.-.......s %BD DDc d}t |d 5 }| d d d d n# 1 swxY w Y t j j | }| dk sJ d S )Nzfoo.txtwbar)openwritepyfakefspytest_testsioInputStreamread)r filepathfstreams r test_use_own_io_moduler1 : s H h " % 1 1( ; ;F;;==E!!!!!!s 599c t j | _ t j t j sJ d S r )r WINDOWSr r r r gettempdirr s r test_switch_to_windowsr5 C s4 NBE 7>>(-//0000000r c t j | _ t j t j sJ d S r )r LINUXr r r r r4 r s r test_switch_to_linuxr8 H 4 LBE 7>>(-//0000000r c t j | _ t j t j sJ d S r )r MACOSr r r r r4 r s r test_switch_to_macosr<