raise an exception with mock_open for builts.open

后端 未结 0 1540
鱼传尺愫
鱼传尺愫 2020-12-29 04:02

I have the following function:

 def detail():
   try:
      with open(\'file1.txt\') as data:
         return data.read()
   except FileNotFoundError:
                


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题