INNER CODE UNIT · Python

_read_changed_modules

O-X-L/ansible-opnsense · scripts/get_changed_modules_pytest.py:12

def _read_changed_modules() -> list[str]:
    with open(TEST_FILE_MODULES, 'r', encoding='utf-8') as f:
        return [m.strip() for m in f.readlines()]


def test_none():
    _write_changes([
        '.github/workflows/functional_test_pr.yml',
        'plugins/module_utils/main/test123.py',
        'scripts/get_changed_modules.py',
    ])

    from get_changed_modules import main
    main(TEST_FILE_CHANGES, TEST_FILE_MODULES)

    m = _read_changed_modules()
    assert len(m) == 0

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…