Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)
Compares old and new lists attributes

tries trivial cases
===================
>>> from comparator import Comparator
>>> old_list = [1,2,3,4,5,6]
>>> new_list = []

new_list is empty
-----------------(more...)

src/l/i/ListComparator-0.1/listcomparator/tests/test_comparator.py   ListComparator(Download)
    def testOldEmpty(self):
        old_list = []
        new_list = [1, 2, 3]
        comp = Comparator(old_list, new_list)
        comp.check()
    def testNewEmpty(self):
        old_list = [1, 2, 3]
        new_list = []
        comp = Comparator(old_list, new_list)
        comp.check()
    def testBothEmpty(self):
        old_list = []
        new_list = []
        comp = Comparator(old_list, new_list)
        comp.check()
    def testEquals(self):
        old_list = [1, 2, 3]
        new_list = [1, 2, 3]
        comp = Comparator(old_list, new_list)
        comp.check()
    def testNewLonger(self):
        old_list = [1, 2, 3]
        new_list = [1, 2, 3, 4, 5, 6]
        comp = Comparator(old_list, new_list)
        comp.check()