Просмотр исходного кода

Explicit asserts of permutations

This allows pytest to report which permutation failed.
nosoop 10 месяцев назад
Родитель
Сommit
55adac3ab6
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      tests/test_demangler.py

+ 2 - 1
tests/test_demangler.py

@@ -137,4 +137,5 @@ def test_function_overloaded(fnsyms: Iterable[str], expected: bool):
     Of course, this is only inference based on symbol name.
     """
     node_syms = map(dh.extract_method_fname, map(dm.parse, fnsyms))
-    assert all(a == b for a, b in itertools.permutations(node_syms, 2))
+    for a, b in itertools.permutations(node_syms, 2):
+        assert a == b