dev_path and commit mutually exclusive
This commit is contained in:
parent
f070163a37
commit
011da2d44a
@ -4278,6 +4278,9 @@ def _specs_with_commits(spec):
|
||||
if not (has_commit_var or has_git_version):
|
||||
return
|
||||
|
||||
if "dev_path" in spec.variants:
|
||||
assert False
|
||||
|
||||
# Specs with commit variants
|
||||
# - variant value satsifies commit regex
|
||||
# - paired to a GitVersion or version that is associated with a branch/tag
|
||||
|
@ -3311,11 +3311,13 @@ def _ensure_cache_hits(self, problem: str):
|
||||
@pytest.mark.parametrize(
|
||||
"spec_str, should_pass, error_type",
|
||||
[
|
||||
# TODO write actual Exceptions for these to give good error messages
|
||||
(f"git-ref-package@main commit={'a' * 40}", True, None),
|
||||
(f"git-ref-package@main commit={'a' * 39}", False, AssertionError),
|
||||
(f"git-ref-package@2.1.6 commit={'a' * 40}", False, AssertionError),
|
||||
(f"git-ref-package@git.2.1.6=2.1.6 commit={'a' * 40}", True, None),
|
||||
(f"git-ref-package@2.1.6 commit={'a' * 40}", False, AssertionError),
|
||||
(f"git-ref-package@main commit={'a' * 40} dev_path=/foo/bar/", False, AssertionError),
|
||||
],
|
||||
)
|
||||
def test_spec_containing_commit_variant(spec_str, should_pass, error_type):
|
||||
|
Loading…
Reference in New Issue
Block a user