def test_npin(self): np.testing.assert_array_equal(self.A, gus.import_graph(self.A))
def test_wrongtypein(self): a = 5 with self.assertRaises(TypeError): gus.import_graph(a) with self.assertRaises(TypeError): gus.import_graph(None)
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))