# Test file for stack.py
# Authors Mark, Efrain, Henry

import pytest
import stack as st

def test_init():
    """Test stack constructor."""
    a = st.Stack()
    assert isinstance(a, st.Stack)

def test_push(populated_stack):
    """Test push function, with empty and populated stacks."""



@pytest.fixture(scope='function')
def empty_stack(request):
    empty = st.Stack()
    return empty

@pytest.fixture(scope='function')
def populated_stack(request):
    populated = st.Stack()
    populated.push('first')
    populated.push('second')
    populated.push('third')
    populated.push('four')
    return populated
@@ -83,16 +83,17 @@
  as st%0A%0A
+%0A
 def test
@@ -204,16 +204,29 @@
 st_push(
+empty_stack, 
 populate
@@ -298,16 +298,602 @@
 cks.%22%22%22%0A
+    empty_stack.push('first')%0A    assert 'first' == empty_stack.top.value%0A    populated_stack.push('fifth')%0A    assert 'fifth' == populated_stack.top.value%0A    populated_stack.push('sixth')%0A    assert 'sixth' == populated_stack.top.value%0A%0Adef test_pop(populated_stack):%0A    %22%22%22Test pop function, with empty and populated stacks.%22%22%22%0A    assert 'fourth' == populated_stack.pop()%0A    assert 'third' == populated_stack.pop()%0A    assert 'second' == populated_stack.pop()%0A    assert 'first' == populated_stack.pop()%0A    with pytest.raises(AttributeError):%0A        assert populated_stack.pop()
 %0A%0A%0A@pyte
@@ -988,16 +988,17 @@
  empty%0A%0A
+%0A
 @pytest.
@@ -1189,16 +1189,18 @@
 sh('four
+th
 ')%0A    r
@@ -1206,16 +1206,17 @@
 return populated
+%0A

Add push and pop test.