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
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-007 | measured | test_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
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
| requirement | linked | path to the implementer |
|---|---|---|
| REQ-DDB-CONFIG-007 | measured | test_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