Skip to content

Commit dd0f5a8

Browse files
author
Matthias Koeppe
committed
src/sage/combinat/root_system/ambient_space.py (_test_norm_of_simple_roots): Skip the test on ImportError
1 parent 6216503 commit dd0f5a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sage/combinat/root_system/ambient_space.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ def _test_norm_of_simple_roots(self, **options):
117117
"""
118118
tester = self._tester(**options)
119119
T = self.cartan_type()
120-
D = T.symmetrizer()
121120
try:
121+
D = T.symmetrizer()
122122
alpha = self.simple_roots(sort=False)
123-
except ImportError:
123+
DD = T.dynkin_diagram()
124+
except ImportError: # Dynkin diagrams need sage.graphs
124125
return
125-
for C in T.dynkin_diagram().connected_components():
126+
for C in DD.connected_components():
126127
tester.assertEqual(len( set( alpha[i].scalar(alpha[i]) / D[i] for i in C ) ), 1)
127128

128129
# FIXME: attribute or method?

0 commit comments

Comments
 (0)