Skip to content

Commit

Permalink
adding test coverage for isomorphism when using digraphs (#6417)
Browse files Browse the repository at this point in the history
Co-authored-by: Mridul Seth <mail@mriduls.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
  • Loading branch information
3 people committed Dec 13, 2023
1 parent dd6d68e commit 7abde00
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions networkx/algorithms/isomorphism/tests/test_isomorphism.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

import networkx as nx
from networkx.algorithms import isomorphism as iso

Expand Down Expand Up @@ -38,3 +40,9 @@ def test_faster_could_be_isomorphic(self):
def test_is_isomorphic(self):
assert iso.is_isomorphic(self.G1, self.G2)
assert not iso.is_isomorphic(self.G1, self.G4)
assert iso.is_isomorphic(self.G1.to_directed(), self.G2.to_directed())
assert not iso.is_isomorphic(self.G1.to_directed(), self.G4.to_directed())
with pytest.raises(
nx.NetworkXError, match="Graphs G1 and G2 are not of the same type."
):
iso.is_isomorphic(self.G1.to_directed(), self.G1)

0 comments on commit 7abde00

Please sign in to comment.