def test_addition_operator_mem_check(): test_str = MyList("abc") test_str2 = MyList("def") test_str3 = test_str + test_str2 test_str2.pop_back() assert get_MyList(test_str3) == "abcdef"
def test_addition_operator_mem_check(): test_str = MyList("abc") test_str2 = MyList("def") test_str3 = test_str + test_str2 test_str2.pop_back() assert get_MyList(test_str3) == "abcdef"
def test_pop_back_nonempty(): test_popb = MyList("popping") for _ in xrange(4): test_popb.pop_back() assert get_MyList(test_popb) == "pop"
def test_pop_back_empty(): test_popb = MyList() test_popb.pop_back() assert get_MyList(test_popb) == ""
def test_equals_operator_nonempty_mem_check(): test_string = MyList("test") test_str2 = MyList("newstring") test_string.reassign(test_str2) test_str2.pop_back() assert get_MyList(test_string) != get_MyList(test_str2)
def test_pop_back_nonempty(): test_popb = MyList("popping") for _ in xrange(4): test_popb.pop_back() assert get_MyList(test_popb) == "pop"
def test_pop_back_empty(): test_popb = MyList() test_popb.pop_back() assert get_MyList(test_popb) == ""
def test_equals_operator_nonempty_mem_check(): test_string = MyList("test") test_str2 = MyList("newstring") test_string.reassign(test_str2) test_str2.pop_back() assert get_MyList(test_string) != get_MyList(test_str2)