def METHOD_NAME(self):
    results = list(toposort({2: set([11]), 9: set([11, 8]), 10: set([11, 3]), 11: set([7, 5]), 8: set([7, 3])}))
    expected = [set([3, 5, 7]), set([8, 11]), set([2, 9, 10])]
    assert results == expected
    # make sure self dependencies are ignored
    results = list(toposort({2: set([2, 11]), 9: set([11, 8]), 10: set([10, 11, 3]), 11: set([7, 5]), 8: set([7, 3])}))
    expected = [set([3, 5, 7]), set([8, 11]), set([2, 9, 10])]
    assert results == expected
    assert list(toposort({1: set()})) == [set([1])]
    assert list(toposort({1: set([1])})) == [set([1])]