mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for file pattern
This commit is contained in:
parent
2a2d7d779e
commit
eefb549567
2 changed files with 7 additions and 2 deletions
|
@ -1,11 +1,14 @@
|
|||
import unittest
|
||||
from slpkg.checks import Check
|
||||
from slpkg.configs import Configs
|
||||
|
||||
|
||||
class TestPkgInstalled(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.check = Check()
|
||||
self.configs = Configs()
|
||||
self.file_pattern = f'*{self.configs.sbo_repo_tag}'
|
||||
self.packages = ['fish', 'ranger', 'pycharm']
|
||||
|
||||
def test_check_exists(self):
|
||||
|
@ -15,7 +18,7 @@ class TestPkgInstalled(unittest.TestCase):
|
|||
self.assertIsNone(self.check.unsupported(self.packages))
|
||||
|
||||
def test_check_installed(self):
|
||||
self.assertListEqual(self.packages, self.check.installed(self.packages))
|
||||
self.assertListEqual(self.packages, self.check.installed(self.packages, self.file_pattern))
|
||||
|
||||
def test_check_blacklist(self):
|
||||
self.assertIsNone(self.check.blacklist(self.packages))
|
||||
|
|
|
@ -7,11 +7,13 @@ class TestUtilities(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
self.utils = Utilities()
|
||||
self.configs = Configs()
|
||||
self.file_pattern = f'*{self.configs.sbo_repo_tag}'
|
||||
self.build_path = Configs.build_path
|
||||
self.package = 'fish-3.4.0-x86_64-2_SBo'
|
||||
|
||||
def test_ins_installed(self):
|
||||
self.assertEqual(self.package, self.utils.is_installed('fish'))
|
||||
self.assertEqual(self.package, self.utils.is_installed('fish', self.file_pattern))
|
||||
|
||||
def test_split_name(self):
|
||||
self.assertEqual('fish', self.utils.split_installed_pkg(self.package)[0])
|
||||
|
|
Loading…
Reference in a new issue