def METHOD_NAME(self):
    self.w.history_file = self.history_filepath
    self.w.history_size = 30
    lines = [str(i) for i in range(1, 101)]
    hist_disk_must_be_smaller_than_hist_mem = False
    for i,line in enumerate(lines, start=1):
        self.enter_line(line)
        hist_mem_start = max(0, i - self.w.history_size)
        hist_mem_stop  = i
        hist_mem = lines[hist_mem_start:hist_mem_stop]
        self.assert_history_in_memory(hist_mem)
        # Every time the on-disk history reaches the same size as the
        # in-memory history, it should trim off a bit more than necessary.
        hist_disk = self.get_history_on_disk()
        if hist_disk_must_be_smaller_than_hist_mem:
            self.assertTrue(len(hist_disk) < len(hist_mem))
        else:
            self.assertTrue(len(hist_disk) <= len(hist_mem))
        if len(hist_mem) == self.w.history_size and \
           len(hist_disk) == len(hist_mem):
            hist_disk_must_be_smaller_than_hist_mem = True
        else:
            hist_disk_must_be_smaller_than_hist_mem = False