Ejemplo n.º 1
0
 def test_npin(self):
     np.testing.assert_array_equal(self.A, gus.import_graph(self.A))
Ejemplo n.º 2
0
 def test_wrongtypein(self):
     a = 5
     with self.assertRaises(TypeError):
         gus.import_graph(a)
     with self.assertRaises(TypeError):
         gus.import_graph(None)
Ejemplo n.º 3
0
 def test_graphin(self):
     G = nx.from_numpy_array(self.A)
     np.testing.assert_array_equal(nx.to_numpy_array(G), gus.import_graph(G))