Ejemplo n.º 1
0
 def test_remove_orphans_fully_connected(self):
     club = nx.karate_club_graph().copy()
     orphans = remove_orphans(club)
     self.assertEqual(orphans, set())
     self.assertEqual(club.nodes(), nx.karate_club_graph().nodes())
Ejemplo n.º 2
0
 def test_remove_orphans_fully_connected(self):
     club = nx.karate_club_graph().copy()
     orphans = remove_orphans(club)
     self.assertEqual(orphans, set())
     self.assertEqual(club.nodes(), nx.karate_club_graph().nodes())
Ejemplo n.º 3
0
 def test_remove_orphans(self):
     club = nx.karate_club_graph().copy()
     club.add_node('test')
     orphans = remove_orphans(club)
     self.assertEqual(orphans, set(['test']))
     self.assertEqual(club.nodes(), nx.karate_club_graph().nodes())
Ejemplo n.º 4
0
 def test_remove_orphans(self):
     club = nx.karate_club_graph().copy()
     club.add_node('test')
     orphans = remove_orphans(club)
     self.assertEqual(orphans, set(['test']))
     self.assertEqual(club.nodes(), nx.karate_club_graph().nodes())