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