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

@ -0,0 +1,3 @@
# airflow
This is a mock subset of the Airflow repository, used to test module resolution.

View file

@ -0,0 +1,14 @@
# Standard library.
import os
# First-party.
from airflow.jobs.scheduler_job_runner import SchedulerJobRunner
# Stub file.
from airflow.compat.functools import cached_property
# Namespace package.
from airflow.providers.google.cloud.hooks.gcs import GCSHook
# Third-party.
from sqlalchemy.orm import Query

View file

@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""

View file

@ -0,0 +1 @@
"""Empty file included to support filesystem-based resolver tests."""