def test_cannot_pop_bottom(): assert len(context._stack) == 1 # pylint: disable=protected-access with pytest.raises(RuntimeError): context.pop()
def cleanup(): # pylint: disable=unused-variable while len(context._stack) > 1: # pylint: disable=protected-access context.pop()
def cleanup(): while len(context._stack) > 1: context.pop()
def test_cannot_pop_bottom(): assert len(context._stack) == 1 with pytest.raises(RuntimeError): context.pop()