2020 RightAction ,
2121 LeftAction ,
2222 Action ,
23- ImageRightAction ,
2423 PPerm ,
2524 BMat8 ,
2625 side ,
@@ -228,14 +227,26 @@ def test_action_001(right_actions, left_actions):
228227 rows .init ()
229228
230229 rows .add_seed (
231- row_space_basis (BMat8 ([[1 , 1 , 1 , 0 ], [1 , 1 , 0 , 0 ], [0 , 1 , 0 , 1 ], [0 , 1 , 0 , 0 ]]))
230+ row_space_basis (
231+ BMat8 ([[1 , 1 , 1 , 0 ], [1 , 1 , 0 , 0 ], [0 , 1 , 0 , 1 ], [0 , 1 , 0 , 0 ]])
232+ )
232233 )
233234
234- rows .add_generator (BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ]]))
235- rows .add_generator (BMat8 ([[0 , 1 , 0 , 0 ], [1 , 0 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ]]))
236- rows .add_generator (BMat8 ([[0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ], [1 , 0 , 0 , 0 ]]))
237- rows .add_generator (BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [1 , 0 , 0 , 1 ]]))
238- rows .add_generator (BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 0 ]]))
235+ rows .add_generator (
236+ BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ]])
237+ )
238+ rows .add_generator (
239+ BMat8 ([[0 , 1 , 0 , 0 ], [1 , 0 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ]])
240+ )
241+ rows .add_generator (
242+ BMat8 ([[0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 1 ], [1 , 0 , 0 , 0 ]])
243+ )
244+ rows .add_generator (
245+ BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [1 , 0 , 0 , 1 ]])
246+ )
247+ rows .add_generator (
248+ BMat8 ([[1 , 0 , 0 , 0 ], [0 , 1 , 0 , 0 ], [0 , 0 , 1 , 0 ], [0 , 0 , 0 , 0 ]])
249+ )
239250
240251 assert len (rows ) == 553
241252
@@ -249,7 +260,9 @@ def test_action_pperm(right_actions):
249260 right = right_actions [1 ]
250261 right .reserve (70000 )
251262 assert len (right ) == 65536
252- assert repr (right ) == "<complete right action with 4 generators, 65536 points>"
263+ assert (
264+ repr (right ) == "<complete right action with 4 generators, 65536 points>"
265+ )
253266 assert right [666 ] == PPerm (
254267 [0 , 2 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 ],
255268 [0 , 2 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 ],
@@ -311,13 +324,15 @@ def test_action_transf(right_actions, extreme_left_actions):
311324
312325def test_action_coverage ():
313326 with pytest .raises (TypeError ):
314- Action (element = PPerm )
327+ Action (generators = PPerm )
315328
316329 with pytest .raises (TypeError ):
317- Action (BadKeywordArg = PPerm , generators = None , seeds = None , help = None )
330+ Action (generators = None , seeds = None )
318331
319332 with pytest .raises (KeyError ):
320- Action (generators = [PPerm ], seeds = [BMat8 ], func = RightAction , side = side .left )
333+ Action (
334+ generators = [PPerm ], seeds = [BMat8 ], func = RightAction , side = side .left
335+ )
321336
322337 right = RightAction (
323338 generators = [
@@ -352,7 +367,9 @@ def test_action_coverage():
352367 seeds = [PPerm .one (17 )],
353368 )
354369
355- assert repr (right ) == "<incomplete right action with 1 generators, 1 points>"
370+ assert (
371+ repr (right ) == "<incomplete right action with 1 generators, 1 points>"
372+ )
356373 with pytest .raises (TypeError ):
357374 right .add_generator (BMat8 (0 ))
358375
@@ -444,7 +461,9 @@ def test_action_reserve(right_actions, left_actions):
444461
445462def test_action_root_of_scc (right_actions , left_actions ):
446463 for action in right_actions + left_actions :
447- expected = BMat8 ([[1 , 1 , 1 , 0 ], [1 , 1 , 0 , 0 ], [0 , 1 , 0 , 1 ], [0 , 1 , 0 , 0 ]])
464+ expected = BMat8 (
465+ [[1 , 1 , 1 , 0 ], [1 , 1 , 0 , 0 ], [0 , 1 , 0 , 1 ], [0 , 1 , 0 , 0 ]]
466+ )
448467 assert action .root_of_scc (0 ) == expected
449468 assert action .root_of_scc (expected ) == expected
450469 with pytest .raises (TypeError ):
@@ -456,4 +475,6 @@ def test_action_word_graph(right_actions, left_actions):
456475 for action in right_actions + left_actions :
457476 wg = action .word_graph ()
458477 assert wg .number_of_nodes () == len (action )
459- assert wg .number_of_edges () == len (action ) * action .number_of_generators ()
478+ assert (
479+ wg .number_of_edges () == len (action ) * action .number_of_generators ()
480+ )
0 commit comments