Commit 0d6cf03e authored by Chris Trevino's avatar Chris Trevino

Remove chrome shunt from networkx tests, use standard assertions

parent 980f9746
from textwrap import dedent
import pytest import pytest
def test_networkx_basicgraph(selenium_standalone, request): def test_networkx_basicgraph(selenium_standalone, request):
selenium = selenium_standalone selenium = selenium_standalone
selenium.load_package(['networkx'])
if selenium.browser == 'chrome': cmd = """
request.applymarker(pytest.mark.xfail(
run=False, reason='chrome not supported'))
selenium.load_package(['networkx', 'numpy'])
cmd = dedent(r"""
import networkx as nx import networkx as nx
from numpy.testing import assert_equal
G = nx.Graph() G = nx.Graph()
G.add_nodes_from([1,2,3]) G.add_nodes_from([1,2,3])
G.add_edges_from([(1,2), (1,3)]) G.add_edges_from([(1,2), (1,3)])
assert_equal(3, G.number_of_nodes()) assert G.number_of_nodes() == 3
assert_equal(2, G.number_of_edges()) assert G.number_of_edges() == 2
""") """
selenium.run(cmd) selenium.run(cmd)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment