Debian Codegraph @

test/units/_internal/_ansiballz/test_builder.py

raw
1 from __future__ import annotations
2
3 from ansible._internal._ansiballz._builder import ExtensionManager
4 from ansible.module_utils._internal._ansiballz._extensions import _pydevd
5
6
7 def test_debugger_source_mapping() -> None:
8 """Synthetic coverage for builder source mapping."""
9 debug_options = _pydevd.Options(source_mapping={
10 "ide/path.py": "controller/path.py",
11 "ide/something.py": "controller/not_match.py",
12 })
13
14 manager = ExtensionManager(debug_options)
15 manager.source_mapping.update({
16 "controller/path.py": "zip/path.py",
17 "controller/other.py": "not_match.py",
18 })
19
20 extensions = manager.get_extensions()
21
22 assert extensions['_pydevd']['source_mapping'] == {'controller/other.py': 'not_match.py', 'ide/path.py': 'zip/path.py'}