def test_should_not_find_trivial_cycles_in_graph_when_there_are_none(self):
     graph_without_trivial_cycle = Graph({"a": "b", "b": "c", "d": "e"})
     graph_without_trivial_cycle.assert_no_trivial_cycles_present()
 def test_should_find_trivial_cycle_in_graph_when_there_is_one(self):
     graph_with_trivial_cycle = Graph({"a": "a"})
     self.assertIsNotNone(
         graph_with_trivial_cycle.assert_no_trivial_cycles_present())
 def test_should_find_trivial_cycle_in_graph_when_there_are_two(self):
     graph_with_trivial_cycles = Graph({"a": "a", "b": "b"})
     self.assertIsNotNone(
         graph_with_trivial_cycles.assert_no_trivial_cycles_present())
示例#4
0
 def test_should_not_find_trivial_cycles_in_graph_when_there_are_none(self):
     graph_without_trivial_cycle = Graph({"a": "b", "b": "c", "d": "e"})
     graph_without_trivial_cycle.assert_no_trivial_cycles_present()