File: test_lib_dependency.py

package info (click to toggle)
rpmlint 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,308 kB
  • sloc: python: 20,622; ansic: 2,511; xml: 1,272; makefile: 17; sh: 4
file content (24 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from mockdata.mock_files import Shlib2DevelPackage
import pytest
from rpmlint.checks.LibraryDependencyCheck import LibraryDependencyCheck
from rpmlint.filter import Filter

from Testing import CONFIG


@pytest.fixture(scope='function', autouse=True)
def libdependencycheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = LibraryDependencyCheck(CONFIG, output)
    return output, test


@pytest.mark.parametrize('package', [Shlib2DevelPackage])
def test_shlib2_devel(package, libdependencycheck):
    output, test = libdependencycheck
    test.check(package)
    test.after_checks()
    out = output.print_results(output.results)
    print(out)
    assert 'E: no-library-dependency-for /usr/lib/libfoo.so.1' in out