Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/test/test_select.py

    r2 r391  
    55import sys
    66
     7@unittest.skipIf(sys.platform[:3] in ('win', 'os2', 'riscos'),
     8                 "can't easily test on this system")
    79class SelectTestCase(unittest.TestCase):
    810
     
    2022        self.assertRaises(TypeError, select.select, [], [], [], "not a number")
    2123
     24    def test_returned_list_identity(self):
     25        # See issue #8329
     26        r, w, x = select.select([], [], [], 1)
     27        self.assertIsNot(r, w)
     28        self.assertIsNot(r, x)
     29        self.assertIsNot(w, x)
     30
    2231    def test_select(self):
    23         if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
    24             if test_support.verbose:
    25                 print "Can't test select easily on", sys.platform
    26             return
    2732        cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
    2833        p = os.popen(cmd, 'r')
     
    4550        p.close()
    4651
     52    # Issue 16230: Crash on select resized list
     53    def test_select_mutated(self):
     54        a = []
     55        class F:
     56            def fileno(self):
     57                del a[-1]
     58                return sys.__stdout__.fileno()
     59        a[:] = [F()] * 10
     60        self.assertEqual(select.select([], a, []), ([], a[:5], []))
    4761
    4862def test_main():
Note: See TracChangeset for help on using the changeset viewer.