|
74 | 74 |
|
75 | 75 | What neither catches, deliberately: a unit-tier module that opens a capture |
76 | 76 | without going through :func:`~tests._support.sample_path` at all, e.g. by joining |
77 | | -:file:`examples/captures/` and a name itself. No *unit-tier* module does this |
78 | | -today -- :file:`tests/protocols/misc/test_pcapng_unit.py` was the last one and |
79 | | -now reads ``sample_path('dhcp_big_endian.pcapng')`` inside the ``try``/``except |
| 77 | +:file:`examples/captures/` and a name itself. No *unit-tier* module does this: |
| 78 | +:file:`tests/protocols/misc/test_pcapng_unit.py` was the last one, and |
| 79 | +reads ``sample_path('dhcp_big_endian.pcapng')`` inside the ``try``/``except |
80 | 80 | FileNotFoundError`` idiom :func:`explain` recommends. Only the *unit* tier is |
81 | 81 | claimed there, deliberately: fixture-tier modules join the directory freely and |
82 | 82 | are entitled to, e.g. :file:`tests/protocols/test_option_coverage_runtime.py`, |
@@ -734,7 +734,7 @@ def skip_idiom_modules() -> 'tuple[pathlib.Path, ...]': |
734 | 734 | :func:`audit_module` carries and for the same reason: a name computed at |
735 | 735 | call time, e.g. ``sample_path(sample)`` in a parametrised loop, is |
736 | 736 | invisible to a static pass. No module in the suite does this inside a |
737 | | - handled call today -- see ``test_every_handled_call_names_a_literal_capture`` |
| 737 | + handled call -- see ``test_every_handled_call_names_a_literal_capture`` |
738 | 738 | in :file:`tests/test_tier_guard.py`, which exists to catch the day one does, |
739 | 739 | since such a call would silently drop out of this function's result and |
740 | 740 | its fixture-backed coverage would quietly stop running anywhere. |
@@ -771,12 +771,12 @@ def _enclosing_scope(tree: 'ast.Module', lineno: 'int') -> 'Optional[tuple[Optio |
771 | 771 | carry that context as it goes. "Most tightly" is decided by span, so a |
772 | 772 | helper function defined inside a test method and containing the line in |
773 | 773 | question would win over the test method itself; nothing in this suite's |
774 | | - skip idiom does that today, but the rule is stated so a future one is |
| 774 | + skip idiom does that, but the rule is stated so a future one is |
775 | 775 | handled the same way :func:`sample_path_calls` already treats nesting. |
776 | 776 |
|
777 | 777 | Returns: |
778 | 778 | :data:`None` if no function definition contains ``lineno`` at all -- |
779 | | - a module-level call, which does not happen in this suite today. |
| 779 | + a module-level call, which does not happen in this suite. |
780 | 780 |
|
781 | 781 | """ |
782 | 782 | best = None # type: Optional[tuple[Optional[str], str, int]] |
@@ -822,8 +822,8 @@ def skip_idiom_test_ids() -> 'tuple[str, ...]': |
822 | 822 |
|
823 | 823 | Falls back to the *module* path when a handled call cannot be resolved to |
824 | 824 | one enclosing function -- :func:`_enclosing_scope` returns :data:`None` for |
825 | | - a module-level call, which is not a shape this suite's skip idiom uses |
826 | | - today, but a fallback that still runs the file is safer than one that |
| 825 | + a module-level call, which is not a shape this suite's skip idiom uses, |
| 826 | + but a fallback that still runs the file is safer than one that |
827 | 827 | drops the call's coverage entirely. |
828 | 828 |
|
829 | 829 | Returns: |
|
0 commit comments