Add snapshot tests for resolver (#5404)

## Summary

This PR adds some snapshot tests for the resolver based on executing
resolutions within a "mock" of the Airflow repo (that is: a folder that
contains a subset of the repo's files, but all empty, and with an
only-partially-complete virtual environment). It's intended to act as a
lightweight integration test, to enable us to test resolutions on a
"real" project without adding a dependency on Airflow itself.
This commit is contained in:
Charlie Marsh 2023-06-28 09:38:51 -04:00 committed by GitHub
parent a68a86e18b
commit 6587fb844a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 391 additions and 22 deletions

View file

@ -8,9 +8,11 @@ use std::path::{Path, PathBuf};
use log::debug;
use crate::config::Config;
use crate::host;
use crate::module_descriptor::ImportModuleDescriptor;
use crate::python_version::PythonVersion;
use crate::{host, SITE_PACKAGES};
const SITE_PACKAGES: &str = "site-packages";
/// Find the `site-packages` directory for the specified Python version.
fn find_site_packages_path(