diff --git a/dokimi/tests/test_context_prefilter_shell.py b/dokimi/tests/test_context_prefilter_shell.py index 7cd90f887..0d7581e57 100644 --- a/dokimi/tests/test_context_prefilter_shell.py +++ b/dokimi/tests/test_context_prefilter_shell.py @@ -5,13 +5,12 @@ from __future__ import annotations -from functools import partial - import pytest +from dokimi.context import prefilter from dokimi.context.prefilter import _without_heredoc_bodies -from tests.growth_timing import GROWTH_LIMIT, growth from tests.test_context_prefilter import CI, _prompt, _report, _row, _session, _tool +from tests.work_count import WORK_LIMIT, count_calls, work_ratio def test_a_stop_word_only_rule_with_an_unmatchable_key_is_a_claim_that_is_not_measurable(): @@ -127,19 +126,18 @@ def test_a_quote_that_closes_on_a_later_line_hides_the_heredoc_sign_inside_it(): assert _row(_report([session]), CI)["acted"] == 1 -def test_the_heredoc_scan_takes_linear_time_in_the_lines_with_a_heredoc_sign(): +def test_the_heredoc_scan_takes_linear_time_in_the_lines_with_a_heredoc_sign(monkeypatch): + """The characters `_heredoc_words` reads (a line and the lines before it that a backslash continues) grow with the command: a re-scan per line was quadratic (counted, #1454).""" def command(k): return "\n".join([": <<< x"] * k + ["cat <