diff options
author | Thomas Heller <theller@ctypes.org> | 2008-08-19 06:36:52 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2008-08-19 06:36:52 (GMT) |
commit | b531bef93ad245ab9533195e284b17d132720e5d (patch) | |
tree | 5b1a924f1fcfc4d00902fe296429b0bc67cbc67e /Lib | |
parent | 039cba1d6852e837967cb6ac0551c3f12e90e622 (diff) | |
download | cpython-b531bef93ad245ab9533195e284b17d132720e5d.zip cpython-b531bef93ad245ab9533195e284b17d132720e5d.tar.gz cpython-b531bef93ad245ab9533195e284b17d132720e5d.tar.bz2 |
Fix and enable a test that now works.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ctypes/test/test_frombuffer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ctypes/test/test_frombuffer.py b/Lib/ctypes/test/test_frombuffer.py index 692d0f0..23e2dcb 100644 --- a/Lib/ctypes/test/test_frombuffer.py +++ b/Lib/ctypes/test/test_frombuffer.py @@ -43,7 +43,7 @@ class Test(unittest.TestCase): self.assertRaises(ValueError, lambda: (c_int * 16).from_buffer(a, sizeof(c_int))) self.assertRaises(ValueError, lambda: (c_int * 1).from_buffer(a, 16 * sizeof(c_int))) - def BROKEN_test_from_buffer_copy(self): + def test_from_buffer_copy(self): a = array.array("i", range(16)) x = (c_int * 16).from_buffer_copy(a) @@ -64,8 +64,8 @@ class Test(unittest.TestCase): del a; gc.collect(); gc.collect(); gc.collect() self.assertEqual(x[:], list(range(16))) - x = (c_char * 16).from_buffer_copy("a" * 16) - self.assertEqual(x[:], "a" * 16) + x = (c_char * 16).from_buffer_copy(b"a" * 16) + self.assertEqual(x[:], b"a" * 16) def test_fom_buffer_copy_with_offset(self): a = array.array("i", range(16)) |