1

I'm currently trying to migrate a test suite to use nosetests. I can't find this in the docs, but is there anyway that you can stub I/O operations with nosetests? What is a simple example for stubbing I/O?

Example:

def test_1():
  read_from_file

def stub_1():
  return "file content"

Reference: https://nose.readthedocs.org/en/latest/

user1431282
  • 6,535
  • 13
  • 51
  • 68
  • 3
    May be you are asking about mocking python's `open` function (like it was done [here](http://stackoverflow.com/questions/5237693/mocking-openfile-name-in-unit-tests))? – alecxe Jun 25 '13 at 21:28

0 Answers0