Beispiel #1
0
 def test_sort_by_name(self):
     files = [
         {'name': 'F.png'},
         {'name': 'd.png'},
         {'name': 'B.png'},
         {'name': 'a.png'},
         {'name': 'c.png'},
         {'name': 'e.png'},
         {'name': 'g.png'},
     ]
     sorted_files = [
         {'name': 'a.png'},
         {'name': 'B.png'},
         {'name': 'c.png'},
         {'name': 'd.png'},
         {'name': 'e.png'},
         {'name': 'F.png'},
         {'name': 'g.png'},
     ]
     ret = sort_by_name(files)
     for index, value in enumerate(ret):
         assert_equal(value['name'], sorted_files[index]['name'])
Beispiel #2
0
 def test_sort_by_name(self):
     files = [
         {"name": "F.png"},
         {"name": "d.png"},
         {"name": "B.png"},
         {"name": "a.png"},
         {"name": "c.png"},
         {"name": "e.png"},
         {"name": "g.png"},
     ]
     sorted_files = [
         {"name": "a.png"},
         {"name": "B.png"},
         {"name": "c.png"},
         {"name": "d.png"},
         {"name": "e.png"},
         {"name": "F.png"},
         {"name": "g.png"},
     ]
     ret = sort_by_name(files)
     for index, value in enumerate(ret):
         assert_equal(value["name"], sorted_files[index]["name"])
Beispiel #3
0
 def test_sort_by_name_none(self):
     files = None
     sorted_files = None
     ret = sort_by_name(files)
     assert_equal(ret, sorted_files)
Beispiel #4
0
 def test_sort_by_name_none(self):
     files = None
     sorted_files = None
     ret = sort_by_name(files)
     assert_equal(ret, sorted_files)