[Jython-checkins] jython: Add a test for seekable pipe and update ACKNOWLEDGMENTS (thanks Stephen Drake!)

darjus.loktevic jython-checkins at python.org
Sun Nov 15 19:56:17 EST 2015


https://hg.python.org/jython/rev/b76b7b840349
changeset:   7812:b76b7b840349
user:        Darjus Loktevic <darjus at gmail.com>
date:        Mon Nov 16 11:54:08 2015 +1100
summary:
  Add a test for seekable pipe and update ACKNOWLEDGMENTS (thanks Stephen Drake!)

files:
  ACKNOWLEDGMENTS        |   1 +
  Lib/test/test_io_jy.py |  16 +++++++++++++++-
  2 files changed, 16 insertions(+), 1 deletions(-)


diff --git a/ACKNOWLEDGMENTS b/ACKNOWLEDGMENTS
--- a/ACKNOWLEDGMENTS
+++ b/ACKNOWLEDGMENTS
@@ -166,6 +166,7 @@
     Eric L Frederich
     Tom Alexander
     Caleb P. Burns
+    Stephen Drake
 
 Local Variables:
 mode: indented-text
diff --git a/Lib/test/test_io_jy.py b/Lib/test/test_io_jy.py
--- a/Lib/test/test_io_jy.py
+++ b/Lib/test/test_io_jy.py
@@ -1,8 +1,12 @@
 import unittest
 from test import test_support
 
+import io
 import _io
 
+from os import pipe
+
+
 class NameTest(unittest.TestCase):
 
     def test_names_available_in__io_module(self):
@@ -16,8 +20,18 @@
               '_BufferedIOBase', '_IOBase', '_RawIOBase', '_TextIOBase'
             })
 
+
+class PipeTestCase(unittest.TestCase):
+
+    def test_pipe_seekable_bool(self):
+        r, _ = pipe()
+
+        self.assertFalse(io.open(r).seekable())
+
+
 def test_main():
-    test_support.run_unittest(NameTest)
+    test_support.run_unittest(NameTest, PipeTestCase)
+
 
 if __name__ == "__main__":
     test_main()

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list