mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 22:56:06 +00:00
Remove unchangeable default_grp from specfiles
Since default_group in specdescription is never modified, remove it as a class member from the Specfiles class and just write the default.
This commit is contained in:
@@ -48,7 +48,6 @@ class Specfile(object):
|
||||
self.sources = {"unit": [], "gcov": [], "tmpfile": [], "archive": []}
|
||||
self.source_index = {}
|
||||
self.default_sum = ""
|
||||
self.default_grp = ""
|
||||
self.licenses = []
|
||||
self.packages = OrderedDict()
|
||||
self.requires = set()
|
||||
@@ -170,7 +169,7 @@ class Specfile(object):
|
||||
Write package summary to spec file
|
||||
"""
|
||||
self._write("Summary : {}\n".format(self.default_sum.strip()))
|
||||
self._write("Group : {}\n".format(self.default_grp.strip()))
|
||||
self._write("Group : Development/Tools\n")
|
||||
|
||||
def write_license(self):
|
||||
"""
|
||||
|
||||
@@ -70,10 +70,9 @@ class TestSpecfileWrite(unittest.TestCase):
|
||||
test write_summary with unstripped summary and group strings
|
||||
"""
|
||||
self.specfile.default_sum = " This is unstripped summary "
|
||||
self.specfile.default_grp = " This is unstripped group "
|
||||
self.specfile.write_summary()
|
||||
expect = ["Summary : This is unstripped summary\n",
|
||||
"Group : This is unstripped group\n"]
|
||||
"Group : Development/Tools\n"]
|
||||
self.assertEqual(expect, self.WRITES)
|
||||
|
||||
def test_write_license(self):
|
||||
|
||||
Reference in New Issue
Block a user