-
-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide the enum behind static methods on the python type
- Loading branch information
Showing
5 changed files
with
69 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
from pants.engine.internals.native_engine import ( | ||
EMPTY_DIGEST, | ||
InferenceMetadata, | ||
NativeDependenciesRequest, | ||
) | ||
|
||
|
||
def test_can_construct_javascript_metadata() -> None: | ||
InferenceMetadata.javascript( | ||
package_root="some/dir", import_patterns={"a-pattern-*": ["replaces-me-*"]} | ||
) | ||
|
||
|
||
def test_can_construct_native_dependencies_request() -> None: | ||
NativeDependenciesRequest(EMPTY_DIGEST, None) | ||
NativeDependenciesRequest( | ||
EMPTY_DIGEST, InferenceMetadata.javascript(package_root="some/dir", import_patterns={}) | ||
) |
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