Updated tests

This commit is contained in:
Dimitris Zlatanidis 2022-06-27 15:55:05 +03:00
parent fcaa619aab
commit 321eb7e102
3 changed files with 5 additions and 8 deletions

View file

@ -105,7 +105,7 @@ class Slackbuilds:
sources = SBoQueries(sbo).sources() sources = SBoQueries(sbo).sources()
self.download_sources(sbo, sources) self.download_sources(sbo, sources)
self.execute_the_script(self.build_path, sbo) self.build_the_script(self.build_path, sbo)
if self.install: if self.install:
@ -158,7 +158,7 @@ class Slackbuilds:
return max(packages) return max(packages)
def execute_the_script(self, path: str, name: str): def build_the_script(self, path: str, name: str):
''' Run the .SlackBuild script. ''' ''' Run the .SlackBuild script. '''
folder = f'{path}/{name}/' folder = f'{path}/{name}/'
slackbuild = f'./{name}.SlackBuild' slackbuild = f'./{name}.SlackBuild'

View file

@ -13,7 +13,7 @@ class TestConfigs(unittest.TestCase):
self.os_arch = Configs.os_arch self.os_arch = Configs.os_arch
def test_repo_version(self): def test_repo_version(self):
self.assertEqual('15.0', self.repo_version) self.assertEqual(15.0, self.repo_version)
def test_sbo_txt(self): def test_sbo_txt(self):
self.assertEqual('SLACKBUILDS.TXT', self.sbo_txt) self.assertEqual('SLACKBUILDS.TXT', self.sbo_txt)

View file

@ -9,12 +9,9 @@ class TestUtilities(unittest.TestCase):
self.utils = Utilities() self.utils = Utilities()
self.build_path = Configs.build_path self.build_path = Configs.build_path
def test_build_tag(self):
self.assertEqual(['2'], self.utils.build_tag(self.build_path,
'fish'))
def test_ins_installed(self): def test_ins_installed(self):
self.assertEqual(True, self.utils.is_installed('fish-3.4.0')) self.assertEqual('fish-3.4.0-x86_64-2_SBo', self.utils.is_installed(
'fish-3.4.0'))
if __name__ == '__main__': if __name__ == '__main__':