2018-12-06 19:24:31 +00:00
|
|
|
def test_networkx_basicgraph(selenium_standalone, request):
|
|
|
|
selenium = selenium_standalone
|
2020-06-28 18:24:40 +00:00
|
|
|
selenium.load_package(["networkx"])
|
2018-12-06 22:03:23 +00:00
|
|
|
cmd = """
|
2018-12-06 19:24:31 +00:00
|
|
|
import networkx as nx
|
|
|
|
|
|
|
|
G = nx.Graph()
|
|
|
|
G.add_nodes_from([1,2,3])
|
|
|
|
G.add_edges_from([(1,2), (1,3)])
|
|
|
|
|
2018-12-06 22:03:23 +00:00
|
|
|
assert G.number_of_nodes() == 3
|
|
|
|
assert G.number_of_edges() == 2
|
|
|
|
"""
|
2018-12-06 19:24:31 +00:00
|
|
|
|
|
|
|
selenium.run(cmd)
|