slpkg/tests/test_checks.py

26 lines
662 B
Python
Raw Normal View History

2022-06-21 17:40:06 +02:00
import unittest
from slpkg.checks import Check
class TestPkgInstalled(unittest.TestCase):
def setUp(self):
self.check = Check()
2022-12-22 23:08:04 +01:00
self.packages = ['fish', 'ranger', 'pycharm']
2022-06-21 17:40:06 +02:00
def test_check_exists(self):
self.assertIsNone(self.check.exists(self.packages))
2022-12-22 22:00:42 +01:00
def test_check_unsupported(self):
2022-06-21 17:40:06 +02:00
self.assertIsNone(self.check.unsupported(self.packages))
def test_check_installed(self):
2022-12-22 23:08:04 +01:00
self.assertListEqual(self.packages, self.check.installed(self.packages))
2022-06-21 17:40:06 +02:00
def test_check_blacklist(self):
2022-12-22 23:08:04 +01:00
self.assertIsNone(self.check.blacklist(self.packages))
2022-06-21 17:40:06 +02:00
if __name__ == "__main__":
unittest.main()