pyyaml hangs under mock

Issue #24 new
Mike Place
created an issue

The following code forces Pyyaml into an endless loop:

from mock import mock_open, patch
import yaml
with patch('', mock_open(read_data='test_data'), create=True):
  with open('dummy', 'r') as fp_:                                                                                                             

Comments (2)

  1. Mike Place reporter

    I should also warn that the above sample code will both hang and endlessly (and rapidly) allocate memory until it is exhausted or Python crashes. :]

  2. Log in to comment