def test_a(): ops = '15 7 1 1 + - / 3 * 2 1 1 + + - print quit'.split() assert process_list(ops) == [5]
def test_b(): ops = '17 3 2 * print dup dup pop + 3 / print swap - 13 + 2 ^ print quit'.split( ) assert process_list(ops) == [6, 4, 0]
def test_list_quit(): ops = 'clear 3 4 * print 2 + quit print'.split() assert process_list(ops) == [12]
def test_list_combo(): ops = 'clear 3 4 * print 2 + print'.split() assert process_list(ops) == [12, 14]
def test_list_plus(): ops = 'clear 3 4 + print'.split() assert process_list(ops) == [7]
def test_c(): ops = '2 128 ^ 3 / -2 * print quit'.split() assert process_list(ops) == [-226854911280625642308916404954512140970]
def test_list_mult(): ops = "clear 3 4 * print".split() assert process_list(ops) == [12]