How to create fake text file in Python

前端 未结 3 2224
独厮守ぢ
独厮守ぢ 2021-02-13 03:21

How can I create a fake file object in Python that contains text? I\'m trying to write unit tests for a method that takes in a file object and retrieves the text via readl

3条回答
提交回复
热议问题