MCPcopy
hub / github.com/networkx/networkx / test_create_using

Function test_create_using

networkx/generators/tests/test_random_graphs.py:401–411  ·  view source on GitHub ↗
(generator, kwargs, create_using_instance)

Source from the content-addressed store, hash-verified

399)
400@pytest.mark.parametrize("create_using_instance", [False, True])
401def test_create_using(generator, kwargs, create_using_instance):
402 class DummyGraph(nx.Graph):
403 pass
404
405 class DummyDiGraph(nx.DiGraph):
406 pass
407
408 create_using_type = DummyDiGraph if kwargs.get("directed") else DummyGraph
409 create_using = create_using_type() if create_using_instance else create_using_type
410 graph = generator(**kwargs, create_using=create_using)
411 assert isinstance(graph, create_using_type)
412
413
414@pytest.mark.parametrize("directed", [True, False])

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…