Skip to content

Commit 92124bf

Browse files
authored
Fixes issue with tag concatenation causing default platform to override platforms (#49)
1 parent 48b59bf commit 92124bf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/manage/tagutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def is_core(self):
185185

186186
def __add__(self, other):
187187
if isinstance(other, str):
188-
return type(self)(self._company, self.tag + other)
188+
return type(self)(self._company, self.tag + self.platform + other)
189189
return NotImplemented
190190

191191
def match(self, pattern):

tests/test_tagutils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,9 @@ def test_tag_range_company():
129129
assert not TagRange(r">=Company\3.10").satisfied_by(CompanyTag("OtherCompany", "3.10"))
130130

131131
assert TagRange("=Company\\").satisfied_by(CompanyTag("Company", "3.11"))
132+
133+
134+
def test_tag_concatenate():
135+
assert CompanyTag("3.13") + "-64" == CompanyTag("3.13-64")
136+
assert CompanyTag("3.13-64") + "-64" == CompanyTag("3.13-64-64")
137+
assert CompanyTag("3.13-arm64") + "-64" == CompanyTag("3.13-arm64-64")

0 commit comments

Comments
 (0)