Skip to content

Commit

Permalink
Trac #25325: Feature check for benzene is broken
Browse files Browse the repository at this point in the history
There is a mistake in the Benzene Features test: it should test for the
">>planar_code<<" string, not for ">>planar_graph<<". As it is now, the
test always fails.

URL: https://trac.sagemath.org/25325
Reported by: gh-antonio-rojas
Ticket author(s): Vincent Delecroix
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager authored and vbraun committed May 14, 2018
2 parents 6fc1e20 + 8b0adb8 commit e59ca0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/features/graph_generators.py
Expand Up @@ -110,7 +110,7 @@ class Benzene(Executable):
sage: from sage.features.graph_generators import Benzene
sage: Benzene().is_present() # optional: benzene
True
FeatureTestResult('Benzene', True)
"""
def __init__(self):
r"""
Expand All @@ -130,7 +130,7 @@ def is_functional(self):
sage: from sage.features.graph_generators import Benzene
sage: Benzene().is_functional() # optional: benzene
True
FeatureTestResult('Benzene', True)
"""
devnull = open(os.devnull, 'wb')
command = ["benzene", "2", "p"]
Expand All @@ -140,7 +140,7 @@ def is_functional(self):
return FeatureTestResult(self, False,
reason="Call `{command}` failed with exit code {e.returncode}".format(command=" ".join(command), e=e))

expected = ">>planar_graph<<"
expected = ">>planar_code<<"
if not lines.startswith(expected):
return FeatureTestResult(self, False,
reason="Call `{command}` did not produce output that started with `{expected}`.".format(command=" ".join(command), expected=expected))
Expand Down

0 comments on commit e59ca0b

Please sign in to comment.