pyodide/packages/networkx/test_networkx.py

16 lines
394 B
Python
Raw Normal View History

2018-12-06 19:24:31 +00:00
def test_networkx_basicgraph(selenium_standalone, request):
selenium = selenium_standalone
selenium.load_package(["networkx"])
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)])
assert G.number_of_nodes() == 3
assert G.number_of_edges() == 2
"""
2018-12-06 19:24:31 +00:00
selenium.run(cmd)