관리-도구
편집 파일: mox3_stubout.cpython-311.pyc
� �܋f � �, � d Z ddlZ G d� d� � ZdS )a� This is a fork of the pymox library intended to work with Python 3. The file was modified by quermit@gmail.com and dawid.fatyga@gmail.com Previously, pyfakefs used just this file from the mox3 library. However, mox3 will soon be decommissioned, yet standard mock cannot be used because of the problem described in pyfakefs #182 and mock issue 250 (https://github.com/testing-cabal/mock/issues/250). Therefore just this file was forked from mox3 and incorporated into pyfakefs. � Nc �6 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z dS ) �StubOutForTestinga� Sample Usage: You want os.path.exists() to always return true during testing. stubs = StubOutForTesting() stubs.Set(os.path, 'exists', lambda x: 1) ... stubs.UnsetAll() The above changes os.path.exists into a lambda that returns 1. Once the ... part of the code finishes, the UnsetAll() looks up the old value of os.path.exists and restores it. c �"