Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (17 sloc) 626 Bytes
import unittest
import paramunittest
from pynetsym.graph import NxGraph, ScipyGraph
@paramunittest.parametrized(
(ScipyGraph, 100),
(NxGraph, )
)
class TestGraph(unittest.TestCase):
def setParameters(self, graph_factory, *args):
self.graph = graph_factory(*args)
def testEmpty(self):
self.assertEqual(0, self.graph.number_of_nodes())
self.assertEqual(0, self.graph.number_of_edges())
def testAddedNode(self):
self.assertEqual(0, self.graph.add_node())
self.assertEqual(1, self.graph.number_of_nodes())
self.assertEqual(0, self.graph.number_of_edges())
Something went wrong with that request. Please try again.