Skip to content

Commit

Permalink
Update insta snapshot for install command
Browse files Browse the repository at this point in the history
  • Loading branch information
owenbrooks committed Nov 4, 2024
1 parent e9071b4 commit c5e52d4
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 8 deletions.
8 changes: 6 additions & 2 deletions crates/uv/tests/it/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,12 @@ fn help_flag_subsubcommand() {
[TARGETS]... The Python version(s) to install
Options:
-r, --reinstall Reinstall the requested Python version, if it's already installed
-f, --force Replace existing Python executables during installation
--mirror <MIRROR> Set the URL to use as the source for downloading Python
installations [env: UV_PYTHON_INSTALL_MIRROR=]
--pypy-mirror <PYPY_MIRROR> Set the URL to use as the source for downloading PyPy
installations [env: UV_PYPY_INSTALL_MIRROR=]
-r, --reinstall Reinstall the requested Python version, if it's already installed
-f, --force Replace existing Python executables during installation
Cache options:
-n, --no-cache Avoid reading from or writing to the cache, instead using a temporary
Expand Down
4 changes: 2 additions & 2 deletions crates/uv/tests/it/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3080,7 +3080,7 @@ fn lock_requires_python() -> Result<()> {
"#,
)?;

uv_snapshot!(context.filters(), context.lock(), @r###"
uv_snapshot!(context.filters(), context.lock(), @r"
success: false
exit_code: 1
----- stdout -----
Expand All @@ -3103,7 +3103,7 @@ fn lock_requires_python() -> Result<()> {
hint: Pre-releases are available for pygls in the requested range (e.g., 2.0.0a2), but pre-releases weren't enabled (try: `--prerelease=allow`)

hint: The `requires-python` value (>=3.7) includes Python versions that are not supported by your dependencies (e.g., pygls>=1.1.0,<=1.2.1 only supports >=3.7.9, <4). Consider using a more restrictive `requires-python` value (like >=3.7.9, <4).
"###);
");

// Require >=3.7, and allow locking to a version of `pygls` that is compatible (==1.0.1).
pyproject_toml.write_str(
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/it/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fn invalid_pyproject_toml_option_unknown_field() -> Result<()> {
|
2 | unknown = "field"
| ^^^^^^^
unknown field `unknown`, expected one of `native-tls`, `offline`, `no-cache`, `cache-dir`, `preview`, `python-preference`, `python-downloads`, `concurrent-downloads`, `concurrent-builds`, `concurrent-installs`, `index`, `index-url`, `extra-index-url`, `no-index`, `find-links`, `index-strategy`, `keyring-provider`, `allow-insecure-host`, `resolution`, `prerelease`, `dependency-metadata`, `config-settings`, `no-build-isolation`, `no-build-isolation-package`, `exclude-newer`, `link-mode`, `compile-bytecode`, `no-sources`, `upgrade`, `upgrade-package`, `reinstall`, `reinstall-package`, `no-build`, `no-build-package`, `no-binary`, `no-binary-package`, `publish-url`, `trusted-publishing`, `pip`, `cache-keys`, `override-dependencies`, `constraint-dependencies`, `environments`, `workspace`, `sources`, `managed`, `package`, `default-groups`, `dev-dependencies`
unknown field `unknown`, expected one of `native-tls`, `offline`, `no-cache`, `cache-dir`, `preview`, `python-preference`, `python-downloads`, `concurrent-downloads`, `concurrent-builds`, `concurrent-installs`, `index`, `index-url`, `extra-index-url`, `no-index`, `find-links`, `index-strategy`, `keyring-provider`, `allow-insecure-host`, `resolution`, `prerelease`, `dependency-metadata`, `config-settings`, `no-build-isolation`, `no-build-isolation-package`, `exclude-newer`, `link-mode`, `compile-bytecode`, `no-sources`, `upgrade`, `upgrade-package`, `reinstall`, `reinstall-package`, `no-build`, `no-build-package`, `no-binary`, `no-binary-package`, `python-install-mirror`, `pypy-install-mirror`, `publish-url`, `trusted-publishing`, `pip`, `cache-keys`, `override-dependencies`, `constraint-dependencies`, `environments`, `workspace`, `sources`, `managed`, `package`, `default-groups`, `dev-dependencies`
Resolved in [TIME]
Audited in [TIME]
Expand Down
118 changes: 117 additions & 1 deletion crates/uv/tests/it/show_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ fn resolve_uv_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -269,6 +273,10 @@ fn resolve_uv_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -417,6 +425,10 @@ fn resolve_uv_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -597,6 +609,10 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -717,6 +733,10 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -875,6 +895,10 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1075,6 +1099,10 @@ fn resolve_index_url() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1282,6 +1310,10 @@ fn resolve_index_url() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1454,6 +1486,10 @@ fn resolve_find_links() -> anyhow::Result<()> {
no_index: true,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1596,6 +1632,10 @@ fn resolve_top_level() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1788,6 +1828,10 @@ fn resolve_top_level() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -1963,6 +2007,10 @@ fn resolve_top_level() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2105,6 +2153,10 @@ fn resolve_user_configuration() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2230,6 +2282,10 @@ fn resolve_user_configuration() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2355,6 +2411,10 @@ fn resolve_user_configuration() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2482,6 +2542,10 @@ fn resolve_user_configuration() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2688,6 +2752,10 @@ fn resolve_tool() -> anyhow::Result<()> {
},
force: false,
editable: false,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
}
----- stderr -----
Expand Down Expand Up @@ -2786,6 +2854,10 @@ fn resolve_poetry_toml() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -2968,6 +3040,10 @@ fn resolve_both() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -3142,6 +3218,10 @@ fn resolve_config_file() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -3230,7 +3310,7 @@ fn resolve_config_file() -> anyhow::Result<()> {
|
1 | [project]
| ^^^^^^^
unknown field `project`, expected one of `native-tls`, `offline`, `no-cache`, `cache-dir`, `preview`, `python-preference`, `python-downloads`, `concurrent-downloads`, `concurrent-builds`, `concurrent-installs`, `index`, `index-url`, `extra-index-url`, `no-index`, `find-links`, `index-strategy`, `keyring-provider`, `allow-insecure-host`, `resolution`, `prerelease`, `dependency-metadata`, `config-settings`, `no-build-isolation`, `no-build-isolation-package`, `exclude-newer`, `link-mode`, `compile-bytecode`, `no-sources`, `upgrade`, `upgrade-package`, `reinstall`, `reinstall-package`, `no-build`, `no-build-package`, `no-binary`, `no-binary-package`, `publish-url`, `trusted-publishing`, `pip`, `cache-keys`, `override-dependencies`, `constraint-dependencies`, `environments`, `workspace`, `sources`, `managed`, `package`, `default-groups`, `dev-dependencies`
unknown field `project`, expected one of `native-tls`, `offline`, `no-cache`, `cache-dir`, `preview`, `python-preference`, `python-downloads`, `concurrent-downloads`, `concurrent-builds`, `concurrent-installs`, `index`, `index-url`, `extra-index-url`, `no-index`, `find-links`, `index-strategy`, `keyring-provider`, `allow-insecure-host`, `resolution`, `prerelease`, `dependency-metadata`, `config-settings`, `no-build-isolation`, `no-build-isolation-package`, `exclude-newer`, `link-mode`, `compile-bytecode`, `no-sources`, `upgrade`, `upgrade-package`, `reinstall`, `reinstall-package`, `no-build`, `no-build-package`, `no-binary`, `no-binary-package`, `python-install-mirror`, `pypy-install-mirror`, `publish-url`, `trusted-publishing`, `pip`, `cache-keys`, `override-dependencies`, `constraint-dependencies`, `environments`, `workspace`, `sources`, `managed`, `package`, `default-groups`, `dev-dependencies`
"###
);

Expand Down Expand Up @@ -3361,6 +3441,10 @@ fn resolve_skip_empty() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -3489,6 +3573,10 @@ fn resolve_skip_empty() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -3625,6 +3713,10 @@ fn allow_insecure_host() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -3834,6 +3926,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -4011,6 +4107,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -4194,6 +4294,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -4372,6 +4476,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -4557,6 +4665,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down Expand Up @@ -4735,6 +4847,10 @@ fn index_priority() -> anyhow::Result<()> {
no_index: false,
},
python: None,
install_mirrors: InstallMirrorOptions {
python_install_mirror: None,
pypy_install_mirror: None,
},
system: false,
extras: None,
break_system_packages: false,
Expand Down
4 changes: 2 additions & 2 deletions crates/uv/tests/it/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn sync() -> Result<()> {
)?;

// Running `uv sync` should generate a lockfile.
uv_snapshot!(context.filters(), context.sync(), @r###"
uv_snapshot!(context.filters(), context.sync(), @r"
success: true
exit_code: 0
----- stdout -----
Expand All @@ -41,7 +41,7 @@ fn sync() -> Result<()> {
Installed 2 packages in [TIME]
+ iniconfig==2.0.0
+ project==0.1.0 (from file://[TEMP_DIR]/)
"###);
");

assert!(context.temp_dir.child("uv.lock").exists());

Expand Down

0 comments on commit c5e52d4

Please sign in to comment.