Skip to content

LimitedHistory should override extend. #1451

@gaffney2010

Description

@gaffney2010

LimitedHistory inherits extend from base class. However expected behavior is that LimitedHistory only keeps the last memory_depth history.

Should make this unittest on TestLimitedHistory pass.

    def test_extend(self):
        h1 = LimitedHistory(3, plays=[C, C, D], coplays=[C, C, C])
        self.assertEqual(list(h1), [C, C, D])
        h1.extend([C, C], [D, D])
        self.assertEqual(list(h1), [D, C, C])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions