mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 03:54:15 +02:00
[tests] refactoring
This commit is contained in:
23
tests/gems/arch/test_pacman.py
Normal file
23
tests/gems/arch/test_pacman.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
from unittest import TestCase
|
||||
|
||||
from bauh.gems.arch import pacman
|
||||
|
||||
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class PacmanTest(TestCase):
|
||||
|
||||
def test_list_ignored_packages(self):
|
||||
ignored = pacman.list_ignored_packages(FILE_DIR + '/resources/pacman_ign_pkgs.conf')
|
||||
|
||||
self.assertIsNotNone(ignored)
|
||||
self.assertEqual(2, len(ignored))
|
||||
self.assertIn('google-chrome', ignored)
|
||||
self.assertIn('firefox', ignored)
|
||||
|
||||
def test_list_ignored_packages__no_ignored_packages(self):
|
||||
ignored = pacman.list_ignored_packages(FILE_DIR + '/resources/pacman.conf')
|
||||
|
||||
self.assertIsNotNone(ignored)
|
||||
self.assertEqual(0, len(ignored))
|
||||
Reference in New Issue
Block a user