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_buffer.py

    r2 r391  
    2222                                     s[start:stop:step])
    2323
     24    def test_newbuffer_interface(self):
     25        # Test that the buffer object has the new buffer interface
     26        # as used by the memoryview object
     27        s = "".join(chr(c) for c in list(range(255, -1, -1)))
     28        b = buffer(s)
     29        m = memoryview(b) # Should not raise an exception
     30        self.assertEqual(m.tobytes(), s)
     31
    2432
    2533def test_main():
    26     test_support.run_unittest(BufferTests)
     34    with test_support.check_py3k_warnings(("buffer.. not supported",
     35                                           DeprecationWarning)):
     36        test_support.run_unittest(BufferTests)
    2737
    2838if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.