Commit 0a1bfa3e authored by Edward Hervey's avatar Edward Hervey 🤘

test_adapter: No longer use slices (which was wrong to start with).

parent 04392b28
......@@ -53,7 +53,7 @@ class AdapterTest(TestCase):
b = self.adapter.peek(5)
# it can return more than 5 bytes
self.assert_(len(b) >= 5)
self.assertEquals(b[:5], "01234")
self.assertEquals(b, "01234")
# it's still 10 bytes big
self.assertEquals(self.adapter.available(), 10)
......@@ -69,7 +69,7 @@ class AdapterTest(TestCase):
self.assertEquals(self.adapter.available(), 5)
# it flushed the first 5 bytes
self.assertEquals(self.adapter.peek(5)[:5], "56789")
self.assertEquals(self.adapter.peek(5), "56789")
self.adapter.flush(5)
self.assertEquals(self.adapter.available(), 0)
......@@ -79,5 +79,5 @@ class AdapterTest(TestCase):
self.assertEquals(self.adapter.available(), 10)
s = self.adapter.take(5)
self.assertEquals(s[:5], "01234")
self.assertEquals(s, "01234")
self.assertEquals(self.adapter.available(), 5)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment