From f303ef8b68b4380877fe9089ce5e7f4c3aed6a5a Mon Sep 17 00:00:00 2001 From: Matvey Pashkovskiy Date: Wed, 31 Mar 2021 23:45:51 +0300 Subject: [PATCH] docs: note about intersection and surroundings algorithm --- pytest_rts/utils/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest_rts/utils/common.py b/pytest_rts/utils/common.py index de9db0a..bbfdc53 100644 --- a/pytest_rts/utils/common.py +++ b/pytest_rts/utils/common.py @@ -103,6 +103,8 @@ def intersect_with_surroundings(changed_lines: Set[int], mapped_lines: Set[int]) changed_lines | 1 5 21 30 mapped_lines | 2 3 10 11 12 20 21 22 result | 2 3 10 21 22 + + Algorithm could be improved. See conversation: https://github.com/F-Secure/pytest-rts/pull/103#pullrequestreview-625312058 """ mapped = changed_lines.intersection(mapped_lines) unmapped = changed_lines.difference(mapped)