title: py.test from Visual Studio - '_DebuggerOutput' object has no attribute 'closed'
body: <p>I'm using Python Tools for Visual Studio with py.test. I'm able to use pytest fine if I run the script without debugging, but when I run with debugging, the script crashes. Below is my code and the output that I get in the console window. I've searched for Google for answers but I've come up with nothing that solves this issue; it seems like no one has had this exact problem before. I'm running Visual Studio 2013, with PTVS 2.1 VS 2013.</p>
  
  <pre><code>#Code
  import pytest
  if __name__ == "__main__":
      pytest.main("--resultlog=resultlog.txt")
  
  #Output
  ! C:\Python34\lib\site-packages\colorama\ansitowin32.py
   Traceback (most recent call last):
     File "C:\Python34\lib\site-packages\_pytest\main.py", line 80, in wrap_session
       config.do_configure()
     File "C:\Python34\lib\site-packages\_pytest\config.py", line 618, in do_configure
       self.hook.pytest_configure(config=self)
     File "C:\Python34\lib\site-packages\_pytest\core.py", line 521, in __call__
       return self._docall(self.methods, kwargs)
     File "C:\Python34\lib\site-packages\_pytest\core.py", line 528, in _docall
       firstresult=self.firstresult).execute()
     File "C:\Python34\lib\site-packages\_pytest\core.py", line 394, in execute
       res = method(*args)
     File "C:\Python34\lib\site-packages\_pytest\terminal.py", line 41, in pytest_configure
       reporter = TerminalReporter(config, sys.stdout)
     File "C:\Python34\lib\site-packages\_pytest\terminal.py", line 101, in __init__
       self._tw = self.writer = py.io.TerminalWriter(file)
     File "C:\Python34\lib\site-packages\py\_io\terminalwriter.py", line 130, in __init__
       file = colorama.AnsiToWin32(file).stream
     File "C:\Python34\lib\site-packages\colorama\ansitowin32.py", line 68, in __init__
       convert = on_windows and not wrapped.closed and not on_emulated_windows and is_a_tty(wrapped)
   AttributeError: '_DebuggerOutput' object has no attribute 'closed'
  </code></pre>
  
  <hr>
  
  <p><strong>Q: How can this error be resolved so that I can debug from inside Visual Studio?</strong></p>
  
  <hr>