Author rbcollins
Recipients rbcollins
Date 2016-04-20.08:18:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461140283.7.0.219960203136.issue26807@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import unittest.mock
>>> o = unittest.mock.mock_open(read_data="fred")
>>> f = o()
>>> f.read()
'fred'
>>> f.read()
''
>>> f.readlines()
[]
>>> f.readline()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/robertc/work/cpython/Lib/unittest/mock.py", line 935, in __call__
    return _mock_self._mock_call(*args, **kwargs)
  File "/home/robertc/work/cpython/Lib/unittest/mock.py", line 994, in _mock_call
    result = next(effect)
StopIteration
History
Date User Action Args
2016-04-20 08:18:03rbcollinssetrecipients: + rbcollins
2016-04-20 08:18:03rbcollinssetmessageid: <1461140283.7.0.219960203136.issue26807@psf.upfronthosting.co.za>
2016-04-20 08:18:03rbcollinslinkissue26807 messages
2016-04-20 08:18:03rbcollinscreate