import unittest
from app import topo_sort
class T(unittest.TestCase):
 def test_all(self):
  self.assertEqual(topo_sort({'build':['lint','test'],'test':['compile'],'lint':[],'compile':[]}),['compile','lint','test','build'])
  self.assertEqual(topo_sort({'b':['a']}),['a','b'])
  with self.assertRaises(ValueError): topo_sort({'a':['b'],'b':['a']})
if __name__=='__main__': unittest.main()
