mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
29 lines
826 B
Python
29 lines
826 B
Python
import os
|
|
import warnings
|
|
from unittest import TestCase
|
|
|
|
from bauh.gems.arch import pacman
|
|
|
|
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
class PacmanTest(TestCase):
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
warnings.filterwarnings('ignore', category=DeprecationWarning)
|
|
|
|
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))
|