Skip to content

Commit 9af5f8a

Browse files
committed
sage.graphs.is_projective_planar_test: new is_projective_planar() pytests
To ensure that is_projective_planar() still works in the absense of the cache (now that it is a @cached_method), we add a new pytest file. For the moment it only tests the Petersen graph, since that is the only graph with the method initially cached.
1 parent df97ee9 commit 9af5f8a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import pytest
2+
3+
4+
def test_petersen_graph_is_projective_planar():
5+
r"""
6+
Ensure that the Petersen graph is projective planar without
7+
using the cache.
8+
"""
9+
from sage.graphs.generators.smallgraphs import PetersenGraph
10+
P = PetersenGraph()
11+
P.is_projective_planar.clear_cache()
12+
assert(not P.is_projective_planar.is_in_cache())
13+
assert(P.is_projective_planar())

0 commit comments

Comments
 (0)