Skip to content

Commit

Permalink
Use proper types in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <nforro@redhat.com>
  • Loading branch information
nforro committed Apr 26, 2022
1 parent 7d64159 commit 4b4bbdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_tag_source_get_number(tag_name, number):
],
)
def test_sources_get_tag_format(ref_name, ref_separator, number, name, separator):
sources = Sources(None, [])
sources = Sources(Tags(), [])
reference = TagSource(Tag(ref_name, "", "", ref_separator, Comments()))
assert sources._get_tag_format(reference, number) == (name, separator)

Expand Down Expand Up @@ -265,7 +265,7 @@ def test_sources_insert_numbered(tags, number, location, index):
],
)
def test_patches_get_tag_format(ref_name, ref_separator, number, name, separator):
patches = Patches(None, [])
patches = Patches(Tags(), [])
reference = TagSource(Tag(ref_name, "", "", ref_separator, Comments()))
assert patches._get_tag_format(reference, number) == (name, separator)

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
def test_find():
tags = Tags(
[
Tag("Name", "test", "test", ": ", []),
Tag("Version", "0.1", "0.1", ": ", []),
Tag("Release", "1%{?dist}", "1.fc35", ": ", []),
Tag("Name", "test", "test", ": ", Comments()),
Tag("Version", "0.1", "0.1", ": ", Comments()),
Tag("Release", "1%{?dist}", "1.fc35", ": ", Comments()),
]
)
assert tags.find("version") == 1
Expand Down Expand Up @@ -122,7 +122,7 @@ def test_get_raw_section_data():
def test_copy_tags():
tags = Tags(
[
Tag("Name", "test", "test", ": ", []),
Tag("Name", "test", "test", ": ", Comments()),
]
)
tags_copy = copy.deepcopy(tags)
Expand Down

0 comments on commit 4b4bbdd

Please sign in to comment.