diff options
-rw-r--r-- | networkx/algorithms/isomorphism/matchhelpers.py | 27 | ||||
-rw-r--r-- | networkx/algorithms/isomorphism/tests/test_isomorphvf2.py | 4 | ||||
-rw-r--r-- | networkx/algorithms/tests/test_graphical.py | 3 | ||||
-rw-r--r-- | networkx/readwrite/tests/test_gml.py | 5 |
4 files changed, 4 insertions, 35 deletions
diff --git a/networkx/algorithms/isomorphism/matchhelpers.py b/networkx/algorithms/isomorphism/matchhelpers.py index 32f5490c..5daaff69 100644 --- a/networkx/algorithms/isomorphism/matchhelpers.py +++ b/networkx/algorithms/isomorphism/matchhelpers.py @@ -102,14 +102,7 @@ def categorical_node_match(attr, default): return match -try: - categorical_edge_match = copyfunc(categorical_node_match, "categorical_edge_match") -except NotImplementedError: - # IronPython lacks support for types.FunctionType. - # https://github.com/networkx/networkx/issues/949 - # https://github.com/networkx/networkx/issues/1127 - def categorical_edge_match(*args, **kwargs): - return categorical_node_match(*args, **kwargs) +categorical_edge_match = copyfunc(categorical_node_match, "categorical_edge_match") def categorical_multiedge_match(attr, default): @@ -198,14 +191,7 @@ def numerical_node_match(attr, default, rtol=1.0000000000000001e-05, atol=1e-08) return match -try: - numerical_edge_match = copyfunc(numerical_node_match, "numerical_edge_match") -except NotImplementedError: - # IronPython lacks support for types.FunctionType. - # https://github.com/networkx/networkx/issues/949 - # https://github.com/networkx/networkx/issues/1127 - def numerical_edge_match(*args, **kwargs): - return numerical_node_match(*args, **kwargs) +numerical_edge_match = copyfunc(numerical_node_match, "numerical_edge_match") def numerical_multiedge_match(attr, default, rtol=1.0000000000000001e-05, atol=1e-08): @@ -302,14 +288,7 @@ def generic_node_match(attr, default, op): return match -try: - generic_edge_match = copyfunc(generic_node_match, "generic_edge_match") -except NotImplementedError: - # IronPython lacks support for types.FunctionType. - # https://github.com/networkx/networkx/issues/949 - # https://github.com/networkx/networkx/issues/1127 - def generic_edge_match(*args, **kwargs): - return generic_node_match(*args, **kwargs) +generic_edge_match = copyfunc(generic_node_match, "generic_edge_match") def generic_multiedge_match(attr, default, op): diff --git a/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py b/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py index 06d041ea..a115b254 100644 --- a/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py +++ b/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py @@ -143,10 +143,6 @@ class TestAtlas: @classmethod def setup_class(cls): global atlas - # import platform - # import pytest - # if platform.python_implementation() == 'Jython': - # pytest.mark.skip('graph atlas not available under Jython.') import networkx.generators.atlas as atlas cls.GAG = atlas.graph_atlas_g() diff --git a/networkx/algorithms/tests/test_graphical.py b/networkx/algorithms/tests/test_graphical.py index 5c5a8819..3e244bbf 100644 --- a/networkx/algorithms/tests/test_graphical.py +++ b/networkx/algorithms/tests/test_graphical.py @@ -41,9 +41,6 @@ class TestAtlas: @classmethod def setup_class(cls): global atlas - # import platform - # if platform.python_implementation() == 'Jython': - # raise SkipTest('graph atlas not available under Jython.') import networkx.generators.atlas as atlas cls.GAG = atlas.graph_atlas_g() diff --git a/networkx/readwrite/tests/test_gml.py b/networkx/readwrite/tests/test_gml.py index d18b5948..7511c233 100644 --- a/networkx/readwrite/tests/test_gml.py +++ b/networkx/readwrite/tests/test_gml.py @@ -336,10 +336,7 @@ graph '"&&&""', [{(b"\xfd",): "\x7f", chr(0x4444): (1, 2)}, (2, "3")], ] - try: # fails under IronPython - data.append(chr(0x14444)) - except ValueError: - data.append(chr(0x1444)) + data.append(chr(0x14444)) data.append(literal_eval("{2.3j, 1 - 2.3j, ()}")) G = nx.Graph() G.name = data |