test_spawn_hint_test_scope.py

tests/test_spawn_hint_test_scope.py

The undeclared-spawn hint skips names defined only in test files (R5-CORE D3; 2.0.0).

test_a_name_defined_only_in_a_test_file_is_not_offered

None test_spawn_hint_test_scope.test_a_name_defined_only_in_a_test_file_is_not_offered()

`fake_thread_create` lives in a test file; `sys_thread_create` does not.

tests/test_spawn_hint_test_scope.py:39

Checks

  • assert detect_undeclared_spawn_primitives(_conn(), []) == ["sys_thread_create"]

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-007measuredtest_a_name_defined_only_in_a_test_file_is_not_offered → detect_undeclared_spawn_primitives
Source · 5 lines
def test_a_name_defined_only_in_a_test_file_is_not_offered() -> None:
    """@brief `fake_thread_create` lives in a test file; `sys_thread_create` does not."""
    assert detect_undeclared_spawn_primitives(_conn(), []) == ["sys_thread_create"]

Activity · 1 steps
lines 41–41assert detect_undeclared_spawn_primitives(_conn(), []) == ["sys_thread_create"]

test_without_a_test_scope_table_both_are_offered

None test_spawn_hint_test_scope.test_without_a_test_scope_table_both_are_offered()

No table means no test files are known: nothing is dropped on that account.

tests/test_spawn_hint_test_scope.py:44

Checks

  • assert detect_undeclared_spawn_primitives(_conn(with_scope=False), []) == [

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-CONFIG-007measuredtest_without_a_test_scope_table_both_are_offered → detect_undeclared_spawn_primitives
Source · 6 lines
def test_without_a_test_scope_table_both_are_offered() -> None:
    """@brief No table means no test files are known: nothing is dropped on that account."""
    assert detect_undeclared_spawn_primitives(_conn(with_scope=False), []) == [
        "fake_thread_create",
        "sys_thread_create",
    ]

1 more lines, not shown

Activity · 1 steps
lines 46–49assert detect_undeclared_spawn_primitives(_conn(with_scope=False), []) == [ "fake_thread_create", "sys_thread_create", ]