def test_map(): """test a4.map_people_to_positions""" tester_name = inspect.stack()[0][3] print("Running " + tester_name + "()") # A quick check: just nicely print the output posns_of = a4.map_people_to_positions(cu.trustees) print('\tPrinting position titles from your function with input cu.trustees') for netid in posns_of: print('\t' + pfile.titles_from_list(netid + ': ', posns_of[netid])) _print_our_map_output()
def test_above(): """Test a4.posns_above. """ tester_name = inspect.stack()[0][3] print("Running " + tester_name + "()") # A quick check: just nicely print the output print(pfile.titles_from_list('above the VDAI: ', a4.posns_above(cu.vdai))) # Two spot checks for inspiration assert_equal_contents(a4.posns_above(cu.vdai), [cu.pma, cu.provost, cu.president, cu.trustees]) assert_equal_contents(a4.posns_above(scraggly.plist[5]), scraggly.plist[:5] + [scraggly.topdog])
def test_above(): """Test a4.posns_above. """ tester_name = inspect.stack()[0][3] print("Running " + tester_name + "()") # A quick check: just nicely print the output """for i in range(12): print(pfile.titles_from_list('above the: '+scraggly.plist[i].title+ " "+ scraggly.plist[i].holder + " ", a4.posns_above(scraggly.plist[i]))) """ print(pfile.titles_from_list('above the counsellor: ', a4.posns_above(cu.vdai))) """print(pfile.titles_from_list('above the trust: ', a4.posns_above(cu.trustees))) print(pfile.titles_from_list('above the prez: ', a4.posns_above(cu.president))) print(pfile.titles_from_list('above the sec cor: ', a4.posns_above(cu.sec_of_corp))) print(pfile.titles_from_list('above the prov: ', a4.posns_above(cu.provost))) print(pfile.titles_from_list('above the XVPCFO: ', a4.posns_above(cu.evp))) print(pfile.titles_from_list('above the dpmedaff: ', a4.posns_above(cu.pma))) print(pfile.titles_from_list('above the dmed: ', a4.posns_above(cu.dean_med))) print(pfile.titles_from_list('above the das: ', a4.posns_above(cu.dean_as))) print(pfile.titles_from_list('above the dbus: ', a4.posns_above(cu.dean_bus)))""" # Two spot checks for inspiration assert_equal_contents(a4.posns_above(cu.vdai), [cu.pma, cu.provost, cu.president, cu.trustees]) assert_equal_contents(a4.posns_above(scraggly.plist[5]), scraggly.plist[:5] + [scraggly.topdog])