mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Remove test dependency on pg_config
(#9853)
By mocking the metadata of `psycopg-c`, we avoid a test dependency on `pg_config` for the warehouse ecosystem test.
This commit is contained in:
parent
f80ddf10b6
commit
6051a26995
3 changed files with 12 additions and 6 deletions
|
@ -56,12 +56,6 @@ fn transformers() -> Result<()> {
|
|||
// Source: https://github.com/konstin/warehouse/blob/baae127d90417104c8dee3fdd3855e2ba17aa428/pyproject.toml
|
||||
#[test]
|
||||
fn warehouse() -> Result<()> {
|
||||
// This build requires running `pg_config`. We could
|
||||
// probably stub it out, but for now, we just skip the
|
||||
// test if we can't run `pg_config`.
|
||||
if std::process::Command::new("pg_config").output().is_err() {
|
||||
return Ok(());
|
||||
}
|
||||
// Also, takes too long on non-Linux in CI.
|
||||
if !cfg!(target_os = "linux") && std::env::var_os(EnvVars::CI).is_some() {
|
||||
return Ok(());
|
||||
|
|
|
@ -8,6 +8,12 @@ requires-python = "==3.11.*"
|
|||
[options]
|
||||
exclude-newer = "2024-08-08T00:00:00Z"
|
||||
|
||||
[manifest]
|
||||
|
||||
[[manifest.dependency-metadata]]
|
||||
name = "psycopg-c"
|
||||
version = "3.2.1"
|
||||
|
||||
[[package]]
|
||||
name = "alabaster"
|
||||
version = "1.0.0"
|
||||
|
|
|
@ -153,6 +153,12 @@ dev-dependencies = [
|
|||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
# Avoid a dependency on `pg_config`
|
||||
[[tool.uv.dependency-metadata]]
|
||||
name = "psycopg-c"
|
||||
version = "3.2.1"
|
||||
requires-dist = []
|
||||
|
||||
[tool.coverage.run]
|
||||
branch = true
|
||||
dynamic_context = "test_function"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue