def test_splitlines(self, size):
        # Crudely calculate an estimate so that the result of s.split won't
        # take up an inordinate amount of memory
        chunksize = int(size ** 0.5 + 2) // 2
        SUBSTR = ' ' * chunksize + '\n' + ' ' * chunksize + '\r\n'
        s = SUBSTR * chunksize
        l = s.splitlines()
        self.assertEquals(len(l), chunksize * 2)
        self.assertEquals(set(l), set([' ' * chunksize]))