Skip to content

Commit

Permalink
Simple testing for EnhancedList.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh-wayz committed Nov 21, 2020
1 parent 0b15539 commit ad071c6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions containers/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,20 @@ def copy(self):
"""Returns a deep copy of the list"""

return deepcopy(self)


def test():
"""Simple testing."""
list = ['1', '2', '2']
test = EnhancedList(list)
assert test.append('3') == '3'
assert test.indices('2') == [1, 2]
test2 = test.copy()
test2[0] = 'test'
if test[0] == 'test':
assert False
else:
assert True


test()

0 comments on commit ad071c6

Please sign in to comment.