( monkeypatch: MonkeyPatch, config_fixture: Path, creds_fixture: Path, )
| 57 | |
| 58 | |
| 59 | def test_correct_parsing_args( |
| 60 | monkeypatch: MonkeyPatch, |
| 61 | config_fixture: Path, |
| 62 | creds_fixture: Path, |
| 63 | ) -> None: |
| 64 | monkeypatch.setattr( |
| 65 | 'sys.argv', |
| 66 | [ |
| 67 | 'archinstall', |
| 68 | '--config', |
| 69 | str(config_fixture), |
| 70 | '--config-url', |
| 71 | 'https://example.com', |
| 72 | '--creds', |
| 73 | str(creds_fixture), |
| 74 | '--script', |
| 75 | 'execution_script', |
| 76 | '--mountpoint', |
| 77 | '/tmp', |
| 78 | '--skip-ntp', |
| 79 | '--skip-wkd', |
| 80 | '--skip-boot', |
| 81 | '--debug', |
| 82 | '--offline', |
| 83 | '--no-pkg-lookups', |
| 84 | '--plugin', |
| 85 | 'pytest_plugin.py', |
| 86 | '--skip-version-check', |
| 87 | '--advanced', |
| 88 | '--dry-run', |
| 89 | '--silent', |
| 90 | ], |
| 91 | ) |
| 92 | |
| 93 | handler = ArchConfigHandler() |
| 94 | args = handler.args |
| 95 | |
| 96 | assert args == Arguments( |
| 97 | config=config_fixture, |
| 98 | config_url='https://example.com', |
| 99 | creds=creds_fixture, |
| 100 | silent=True, |
| 101 | dry_run=True, |
| 102 | script='execution_script', |
| 103 | mountpoint=Path('/tmp'), |
| 104 | skip_ntp=True, |
| 105 | skip_wkd=True, |
| 106 | skip_boot=True, |
| 107 | debug=True, |
| 108 | offline=True, |
| 109 | no_pkg_lookups=True, |
| 110 | plugin=Path('pytest_plugin.py'), |
| 111 | plugin_url=None, |
| 112 | skip_version_check=True, |
| 113 | advanced=True, |
| 114 | ) |
| 115 | |
| 116 |
nothing calls this directly
no test coverage detected