packages: add pragma no cover for alpm
travisci runs tests on a different distro, so libalpm is not testable.
This commit is contained in:
parent
c51bfe07f4
commit
58213b4523
@ -3,7 +3,7 @@
|
|||||||
import operator
|
import operator
|
||||||
|
|
||||||
|
|
||||||
def load_alpm(name=None):
|
def load_alpm(name=None): # pragma: no cover
|
||||||
# Load the alpm library and set up some of the functions we might use
|
# Load the alpm library and set up some of the functions we might use
|
||||||
if name is None:
|
if name is None:
|
||||||
name = find_library('alpm')
|
name = find_library('alpm')
|
||||||
@ -62,14 +62,14 @@ def compare_versions(self, ver1, oper, ver2):
|
|||||||
return func(res, 0)
|
return func(res, 0)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(): # pragma: no cover
|
||||||
api = AlpmAPI()
|
api = AlpmAPI()
|
||||||
print(api.version())
|
print(api.version())
|
||||||
print(api.vercmp(1, 2))
|
print(api.vercmp(1, 2))
|
||||||
print(api.compare_versions(1, '<', 2))
|
print(api.compare_versions(1, '<', 2))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__': # pragma: no cover
|
||||||
main()
|
main()
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 et:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
Loading…
Reference in New Issue
Block a user