Skip to content

Commit

Permalink
Fix test and import
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Mar 12, 2024
1 parent 9fe216c commit e55e153
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions exasol/toolbox/git.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from subprocess import run
import subprocess
from typing import Iterable


Expand All @@ -11,5 +11,5 @@ def tags() -> Iterable[str]:
- the code is executed where the working directory is within a git repository
"""
command = ["git", "tag", "--sort=committerdate"]
result = run(command, capture_output=True, check=True)
result = subprocess.run(command, capture_output=True, check=True)
return [tag.strip() for tag in result.stdout.decode("utf-8").splitlines()]
4 changes: 3 additions & 1 deletion test/unit/git_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def git_tag():
returncode=0,
stdout=cleandoc(
"""
0.0.1
0.1.0
0.2.0
0.3.0
Expand All @@ -25,7 +26,7 @@ def git_tag():
0.7.0
0.8.0
"""
),
).encode("utf8"),
stderr="",
)
yield result
Expand All @@ -34,6 +35,7 @@ def git_tag():
def test_git_tags(git_tag):
expected = sorted(
[
"0.0.1",
"0.1.0",
"0.2.0",
"0.3.0",
Expand Down

0 comments on commit e55e153

Please sign in to comment.