From 321eb7e10257da3d68d197f1db7073d4451ef96b Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 27 Jun 2022 15:55:05 +0300 Subject: [PATCH] Updated tests --- slpkg/slackbuild.py | 4 ++-- tests/test_configs.py | 2 +- tests/test_utilities.py | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index a3dcdc2e..46387001 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -105,7 +105,7 @@ class Slackbuilds: sources = SBoQueries(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: @@ -158,7 +158,7 @@ class Slackbuilds: 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. ''' folder = f'{path}/{name}/' slackbuild = f'./{name}.SlackBuild' diff --git a/tests/test_configs.py b/tests/test_configs.py index 51aa9c00..0f35d22c 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -13,7 +13,7 @@ class TestConfigs(unittest.TestCase): self.os_arch = Configs.os_arch def test_repo_version(self): - self.assertEqual('15.0', self.repo_version) + self.assertEqual(15.0, self.repo_version) def test_sbo_txt(self): self.assertEqual('SLACKBUILDS.TXT', self.sbo_txt) diff --git a/tests/test_utilities.py b/tests/test_utilities.py index 44a27c37..fe98b492 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -9,12 +9,9 @@ class TestUtilities(unittest.TestCase): self.utils = Utilities() 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): - 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__':