Discussion:
[Python-3000-checkins] r65731 - python/branches/py3k/Lib/test/test_bytes.py
antoine.pitrou
2008-08-16 23:28:45 UTC
Permalink
Author: antoine.pitrou
Date: Sun Aug 17 01:28:44 2008
New Revision: 65731

Log:
Issue #3571: test_bytes mistakingly closed stdin



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"")
Benjamin Peterson
2008-08-16 23:30:36 UTC
Permalink
On Sat, Aug 16, 2008 at 6:28 PM, antoine.pitrou
Post by antoine.pitrou
Author: antoine.pitrou
Date: Sun Aug 17 01:28:44 2008
New Revision: 65731
Issue #3571: test_bytes mistakingly closed stdin
Is this applicable to the trunk?
Post by antoine.pitrou
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
+ fd = os.dup(sys.stdin.fileno())
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."
Antoine Pitrou
2008-08-16 23:56:31 UTC
Permalink
Post by Benjamin Peterson
On Sat, Aug 16, 2008 at 6:28 PM, antoine.pitrou
Post by antoine.pitrou
Author: antoine.pitrou
Date: Sun Aug 17 01:28:44 2008
New Revision: 65731
Issue #3571: test_bytes mistakingly closed stdin
Is this applicable to the trunk?
No, it was only affecting py3k.

cheers

Antoine.

Loading...