Skip to content

Commit 5e95011

Browse files
committed
Use fixture for CliArguments also bump dependency versions
1 parent 77bab87 commit 5e95011

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ ignore = [
105105
"PTH113",
106106
"PTH118",
107107
"PTH123",
108+
"PLR0913",
108109
"S105",
109110
"S108",
110111
"S311",

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ click==8.3.0
2121
# userpath
2222
coverage==7.10.7
2323
# via pytest-cov
24-
cryptography==46.0.1
24+
cryptography==46.0.2
2525
# via secretstorage
2626
cyclonedx-python-lib==9.1.0
2727
# via pip-audit
@@ -41,7 +41,7 @@ gitpython==3.1.45
4141
# via autogit (pyproject.toml)
4242
h11==0.16.0
4343
# via httpcore
44-
hatch==1.14.1
44+
hatch==1.14.2
4545
# via autogit (pyproject.toml)
4646
hatchling==1.27.0
4747
# via hatch
@@ -148,7 +148,7 @@ rich==14.1.0
148148
# via
149149
# hatch
150150
# pip-audit
151-
ruff==0.13.1
151+
ruff==0.13.2
152152
# via autogit (pyproject.toml)
153153
secretstorage==3.4.0
154154
# via keyring

tests/test_2_get_repository_states.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from autogit.actions._2_get_repository_states import get_repository_state
4+
from autogit.data_types import CliArguments
45

56

67
@pytest.mark.parametrize(
@@ -24,10 +25,23 @@
2425
],
2526
)
2627
def test_get_repository_state(
27-
repo_url, expected_name, expected_owner, expected_group, expected_domain
28+
args, repo_url, expected_name, expected_owner, expected_group, expected_domain
2829
):
29-
repo_state = get_repository_state(repo_url, 'tmp', None)
30+
repo_state = get_repository_state(repo_url, 'tmp', args)
3031
assert repo_state.name == expected_name
3132
assert repo_state.owner == expected_owner
3233
assert repo_state.group == expected_group
3334
assert repo_state.domain == expected_domain
35+
36+
37+
@pytest.fixture
38+
def args():
39+
return CliArguments(
40+
action_id='test_action_id',
41+
repos=['https://gitlab.com/myuser/myreponame.git'],
42+
clone_to='tmp',
43+
commands=['echo', "'Hello'"],
44+
commit_message='Test commit message',
45+
verbose=False,
46+
branch='test_branch',
47+
)

0 commit comments

Comments
 (0)