[Python-3000-checkins] r65731 - python/branches/py3k/Lib/test/test_bytes.py

Benjamin Peterson musiccomposition at gmail.com
Sun Aug 17 01:30:36 CEST 2008


On Sat, Aug 16, 2008 at 6:28 PM, antoine.pitrou
<python-3000-checkins at python.org> wrote:
> Author: antoine.pitrou
> Date: Sun Aug 17 01:28:44 2008
> New Revision: 65731
>
> Log:
> Issue #3571: test_bytes mistakingly closed stdin

Is this applicable to the trunk?
>
>
>
> Modified:
>   python/branches/py3k/Lib/test/test_bytes.py
>
> Modified: python/branches/py3k/Lib/test/test_bytes.py
> ==============================================================================
> --- python/branches/py3k/Lib/test/test_bytes.py (original)
> +++ python/branches/py3k/Lib/test/test_bytes.py Sun Aug 17 01:28:44 2008
> @@ -454,7 +454,8 @@
>     type2test = bytes
>
>     def test_buffer_is_readonly(self):
> -        with open(sys.stdin.fileno(), "rb", buffering=0) as f:
> +        fd = os.dup(sys.stdin.fileno())
> +        with open(fd, "rb", buffering=0) as f:
>             self.assertRaises(TypeError, f.readinto, b"")
>
>
> _______________________________________________
> Python-3000-checkins mailing list
> Python-3000-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-3000-checkins
>



-- 
Cheers,
Benjamin Peterson
"There's no place like 127.0.0.1."


More information about the Python-3000-checkins mailing list