We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5f1ff7 commit b0fd434Copy full SHA for b0fd434
clang_tools/util.py
@@ -116,4 +116,5 @@ def parse_version(version: str) -> Tuple[int]:
116
try:
117
return tuple([int(x) for x in version_tuple])
118
except ValueError:
119
+ assert Path(version).exists(), "specified version is not a semantic or a path"
120
return (0, 0, 0)
tests/test_util.py
@@ -43,5 +43,5 @@ def test_get_sha(monkeypatch: pytest.MonkeyPatch):
43
44
def test_version_path():
45
"""Tests version parsing when given specification is a path."""
46
- version = "some/path/to/bin/folder"
+ version = str(Path(__file__).parent)
47
assert parse_version(version) == (0, 0, 0)
0 commit comments