File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,9 @@ def iterate(cls) -> Iterator[AlgoSpec]:
113113 yield value
114114
115115 @classmethod
116- def armor_names (cls ) -> list [str ]:
117- return [spec .armor_name () for spec in cls .iterate ()]
116+ def armor_names (cls , pqa_type : PQAType | None = None ) -> list [str ]:
117+ return [spec .armor_name () for spec in cls .iterate ()
118+ if not pqa_type or spec .type == pqa_type ]
118119
119120
120121SupportedVariants = [PQAVariant .REF ]
Original file line number Diff line number Diff line change @@ -108,9 +108,10 @@ def test_supported_algos():
108108 for item in const .SupportedAlgos .iterate ():
109109 assert isinstance (item , const .AlgoSpec )
110110
111- armor_names = const .SupportedAlgos .armor_names ()
112- assert isinstance (armor_names , list )
113- assert all ([isinstance (n , str ) for n in armor_names ])
111+ for pqa_type in [None , * const .PQAType .members ()]:
112+ armor_names = const .SupportedAlgos .armor_names (pqa_type )
113+ assert isinstance (armor_names , list )
114+ assert all ([isinstance (n , str ) for n in armor_names ])
114115
115116
116117def test_pqclean_repo_archive_url ():
You can’t perform that action at this time.
0 commit comments