From: Thomas Heller Date: Tue, 19 Aug 2008 06:36:52 +0000 (+0000) Subject: Fix and enable a test that now works. X-Git-Tag: v3.0b3~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b531bef93ad245ab9533195e284b17d132720e5d;p=python Fix and enable a test that now works. --- diff --git a/Lib/ctypes/test/test_frombuffer.py b/Lib/ctypes/test/test_frombuffer.py index 692d0f0306..23e2dcbb56 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))