Commit 7d4a8ef
authored
fix: ignore local config during tests (#3006)
# Rationale for this change
Fixes a test failure that hits anyone with PyIceberg already configured.
The test uses `load_catalog("default", type="in-memory")`, which merges
your dev environment config with the test parameters. If you have a
`default` catalog defined in `~/.pyiceberg.yaml` with something like
uri: https://best-rest-catalog.com, the merge produces `{"uri":
"https://best-rest-catalog.com", "type": "in-memory"}`. SQLAlchemy sees
that https:// URI and tries to load it as a database dialect, which
fails wuth:
```
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:https
```
Therefore, this PR avoids using the local pyicberg.yaml file entirely!
## Are these changes tested?
Yes. I created a conflicting ~/.pyiceberg.yaml with a default catalog
pointing to an HTTPS REST endpoint, confirmed the old code fails, and
verified the fix bypasses the config merge and works.
## Are there any user-facing changes?
No1 parent b98de51 commit 7d4a8ef
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
0 commit comments