mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-03-04 14:48:45 +00:00
Polish set of stacks solution
This commit is contained in:
@@ -5,8 +5,7 @@ class TestSetOfStacks(object):
|
||||
|
||||
def test_set_of_stacks(self):
|
||||
print('Test: Push on an empty stack')
|
||||
capacity = 2
|
||||
stacks = SetOfStacks(capacity)
|
||||
stacks = SetOfStacks(capacity=2)
|
||||
stacks.push(3)
|
||||
|
||||
print('Test: Push on a non-empty stack')
|
||||
@@ -15,7 +14,7 @@ class TestSetOfStacks(object):
|
||||
print('Test: Push on a capacity stack to create a new one')
|
||||
stacks.push('a')
|
||||
|
||||
print('Test: Pop on a one element stack to destroy it')
|
||||
print('Test: Pop on a stack to destroy it')
|
||||
assert_equal(stacks.pop(), 'a')
|
||||
|
||||
print('Test: Pop general case')
|
||||
|
||||
Reference in New Issue
Block a user