Skip to content

Commit

Permalink
Try to debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Jan 10, 2024
1 parent 2c1fc76 commit 773872d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,12 @@ impl DriverManager {
filepath: P,
properties: DriverProperties,
) -> Option<Driver> {
let mut drivers = Self::get_output_drivers_for_name(filepath, properties);
let drivers = Self::get_output_drivers_for_name(filepath, properties);
let drivers = drivers.collect::<Vec<_>>();
for d in &drivers {
dbg!(d.short_name());
}
let mut drivers = drivers.into_iter();
drivers.next().map(|d| match d.short_name().as_str() {
"GMT" => drivers.find(|d| d.short_name() == "netCDF").unwrap_or(d),
"COG" => drivers.find(|d| d.short_name() == "GTiff").unwrap_or(d),
Expand Down Expand Up @@ -702,7 +707,7 @@ mod tests {
assert!(drivers("test.nc", false).contains("netCDF"));
}
if DriverManager::get_driver_by_name("PostgreSQL").is_ok() {
assert!(dbg!(drivers("PG:test", true)).contains("PostgreSQL"));
assert!(drivers("PG:test", true).contains("PostgreSQL"));
}
}

Expand Down

0 comments on commit 773872d

Please sign in to comment.