From c3231eaed5753eab567985a79fd1b716484edec2 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Fri, 7 Jul 2017 15:10:48 -0700 Subject: [PATCH] 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. --- autospec/specfiles.py | 3 +-- tests/test_specfile.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/autospec/specfiles.py b/autospec/specfiles.py index ed06032..e239073 100644 --- a/autospec/specfiles.py +++ b/autospec/specfiles.py @@ -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): """ diff --git a/tests/test_specfile.py b/tests/test_specfile.py index bb14e3e..02a127e 100644 --- a/tests/test_specfile.py +++ b/tests/test_specfile.py @@ -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):