-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a snapshot test for native module resolution (#5423)
- Loading branch information
1 parent
864f50a
commit 0e12eb3
Showing
10 changed files
with
190 additions
and
24 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...s/test/airflow/venv/lib/python3.11/site-packages/_watchdog_fsevents.cpython-311-darwin.so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Empty file included to support filesystem-based resolver tests. |
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
...ources/test/airflow/venv/lib/python3.11/site-packages/orjson/orjson.cpython-311-darwin.so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Empty file included to support filesystem-based resolver tests. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...n_resolver/src/snapshots/ruff_python_resolver__tests__airflow_explicit_native_module.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
source: crates/ruff_python_resolver/src/lib.rs | ||
expression: result | ||
--- | ||
ImportResult { | ||
is_relative: false, | ||
is_import_found: true, | ||
is_partly_resolved: false, | ||
is_namespace_package: false, | ||
is_init_file_present: false, | ||
is_stub_package: false, | ||
import_type: ThirdParty, | ||
resolved_paths: [ | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages/_watchdog_fsevents.cpython-311-darwin.so", | ||
], | ||
search_path: Some( | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages", | ||
), | ||
is_stub_file: false, | ||
is_native_lib: true, | ||
is_stdlib_typeshed_file: false, | ||
is_third_party_typeshed_file: false, | ||
is_local_typings_file: false, | ||
implicit_imports: {}, | ||
filtered_implicit_imports: {}, | ||
non_stub_import_result: None, | ||
py_typed_info: None, | ||
package_directory: None, | ||
} |
85 changes: 85 additions & 0 deletions
85
...n_resolver/src/snapshots/ruff_python_resolver__tests__airflow_implicit_native_module.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
source: crates/ruff_python_resolver/src/lib.rs | ||
expression: result | ||
--- | ||
ImportResult { | ||
is_relative: false, | ||
is_import_found: true, | ||
is_partly_resolved: false, | ||
is_namespace_package: false, | ||
is_init_file_present: true, | ||
is_stub_package: false, | ||
import_type: ThirdParty, | ||
resolved_paths: [ | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/__init__.pyi", | ||
], | ||
search_path: Some( | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages", | ||
), | ||
is_stub_file: true, | ||
is_native_lib: false, | ||
is_stdlib_typeshed_file: false, | ||
is_third_party_typeshed_file: false, | ||
is_local_typings_file: false, | ||
implicit_imports: { | ||
"orjson": ImplicitImport { | ||
is_stub_file: false, | ||
is_native_lib: true, | ||
name: "orjson", | ||
path: "./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/orjson.cpython-311-darwin.so", | ||
py_typed: None, | ||
}, | ||
}, | ||
filtered_implicit_imports: {}, | ||
non_stub_import_result: Some( | ||
ImportResult { | ||
is_relative: false, | ||
is_import_found: true, | ||
is_partly_resolved: false, | ||
is_namespace_package: false, | ||
is_init_file_present: true, | ||
is_stub_package: false, | ||
import_type: ThirdParty, | ||
resolved_paths: [ | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/__init__.py", | ||
], | ||
search_path: Some( | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages", | ||
), | ||
is_stub_file: false, | ||
is_native_lib: false, | ||
is_stdlib_typeshed_file: false, | ||
is_third_party_typeshed_file: false, | ||
is_local_typings_file: false, | ||
implicit_imports: { | ||
"orjson": ImplicitImport { | ||
is_stub_file: false, | ||
is_native_lib: true, | ||
name: "orjson", | ||
path: "./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/orjson.cpython-311-darwin.so", | ||
py_typed: None, | ||
}, | ||
}, | ||
filtered_implicit_imports: {}, | ||
non_stub_import_result: None, | ||
py_typed_info: Some( | ||
PyTypedInfo { | ||
py_typed_path: "./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/py.typed", | ||
is_partially_typed: false, | ||
}, | ||
), | ||
package_directory: Some( | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages/orjson", | ||
), | ||
}, | ||
), | ||
py_typed_info: Some( | ||
PyTypedInfo { | ||
py_typed_path: "./resources/test/airflow/venv/lib/python3.11/site-packages/orjson/py.typed", | ||
is_partially_typed: false, | ||
}, | ||
), | ||
package_directory: Some( | ||
"./resources/test/airflow/venv/lib/python3.11/site-packages/orjson", | ||
), | ||
} |