From cfd73d5a81bfa523163c62e7602f91c5c99526f3 Mon Sep 17 00:00:00 2001 From: Chris Trevino Date: Thu, 6 Dec 2018 11:24:31 -0800 Subject: [PATCH] Add networkx --- packages/decorator/meta.yaml | 7 +++++++ packages/networkx/meta.yaml | 16 ++++++++++++++++ test/packages/test_networkx.py | 26 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 packages/decorator/meta.yaml create mode 100644 packages/networkx/meta.yaml create mode 100644 test/packages/test_networkx.py diff --git a/packages/decorator/meta.yaml b/packages/decorator/meta.yaml new file mode 100644 index 000000000..280a295c2 --- /dev/null +++ b/packages/decorator/meta.yaml @@ -0,0 +1,7 @@ +package: + name: decorator + version: 4.3.0 + +source: + url: https://files.pythonhosted.org/packages/6f/24/15a229626c775aae5806312f6bf1e2a73785be3402c0acdec5dbddd8c11e/decorator-4.3.0.tar.gz + sha256: c39efa13fbdeb4506c476c9b3babf6a718da943dab7811c206005a4a956c080c diff --git a/packages/networkx/meta.yaml b/packages/networkx/meta.yaml new file mode 100644 index 000000000..53c0f13d6 --- /dev/null +++ b/packages/networkx/meta.yaml @@ -0,0 +1,16 @@ +package: + name: networkx + version: '2.2' + +source: + url: https://files.pythonhosted.org/packages/f3/f4/7e20ef40b118478191cec0b58c3192f822cace858c19505c7670961b76b2/networkx-2.2.zip + sha256: 45e56f7ab6fe81652fb4bc9f44faddb0e9025f469f602df14e3b2551c2ea5c8b + +requirements: + run: + - decorator + - setuptools + +test: + imports: + - networkx \ No newline at end of file diff --git a/test/packages/test_networkx.py b/test/packages/test_networkx.py new file mode 100644 index 000000000..b209a5ac9 --- /dev/null +++ b/test/packages/test_networkx.py @@ -0,0 +1,26 @@ +from textwrap import dedent + +import pytest + + +def test_networkx_basicgraph(selenium_standalone, request): + selenium = selenium_standalone + + if selenium.browser == 'chrome': + request.applymarker(pytest.mark.xfail( + run=False, reason='chrome not supported')) + + selenium.load_package(['networkx', 'numpy']) + cmd = dedent(r""" + import networkx as nx + from numpy.testing import assert_equal + + G = nx.Graph() + G.add_nodes_from([1,2,3]) + G.add_edges_from([(1,2), (1,3)]) + + assert_equal(3, G.number_of_nodes()) + assert_equal(2, G.number_of_edges()) + """) + + selenium.run(cmd)