local merge of #1967 - Change exception raised by capture.DontReadFromInput.fileno()
This commit is contained in:
commit
377e649e61
1
AUTHORS
1
AUTHORS
|
@ -131,5 +131,6 @@ Tom Viner
|
|||
Trevor Bekolay
|
||||
Tyler Goodlet
|
||||
Vasily Kuznetsov
|
||||
Vlad Dragos
|
||||
Wouter van Ackooy
|
||||
Xuecong Liao
|
||||
|
|
|
@ -24,6 +24,8 @@ Changes
|
|||
* ``--pdbcls`` no longer implies ``--pdb``. This makes it possible to use
|
||||
``addopts=--pdbcls=module.SomeClass`` on ``pytest.ini``. Thanks `@davidszotten`_ for
|
||||
the PR (`#1952`_).
|
||||
* Change exception raised by ``capture.DontReadFromInput.fileno()`` from ``ValueError``
|
||||
to ``io.UnsupportedOperation``. Thanks `@vlad-dragos`_ for the PR.
|
||||
|
||||
|
||||
.. _@davidszotten: https://github.com/davidszotten
|
||||
|
@ -92,6 +94,7 @@ Changes
|
|||
.. _@raquel-ucl: https://github.com/raquel-ucl
|
||||
.. _@axil: https://github.com/axil
|
||||
.. _@tgoodlet: https://github.com/tgoodlet
|
||||
.. _@vlad-dragos: https://github.com/vlad-dragos
|
||||
|
||||
.. _#1853: https://github.com/pytest-dev/pytest/issues/1853
|
||||
.. _#1905: https://github.com/pytest-dev/pytest/issues/1905
|
||||
|
|
|
@ -7,6 +7,7 @@ from __future__ import with_statement
|
|||
import contextlib
|
||||
import sys
|
||||
import os
|
||||
from io import UnsupportedOperation
|
||||
from tempfile import TemporaryFile
|
||||
|
||||
import py
|
||||
|
@ -447,7 +448,8 @@ class DontReadFromInput:
|
|||
__iter__ = read
|
||||
|
||||
def fileno(self):
|
||||
raise ValueError("redirected Stdin is pseudofile, has no fileno()")
|
||||
raise UnsupportedOperation("redirected stdin is pseudofile, "
|
||||
"has no fileno()")
|
||||
|
||||
def isatty(self):
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue