27 lines
740 B
Python
27 lines
740 B
Python
# -*- coding: utf-8 -*-
|
|
import os
|
|
from entropy.exceptions import FileNotFound
|
|
|
|
def get_test_generic_package(test_pkg):
|
|
path1 = os.path.join(os.getcwd(), test_pkg)
|
|
path2 = os.path.join(os.getcwd(), "..", test_pkg)
|
|
if os.path.isfile(path1):
|
|
return path1
|
|
elif os.path.isfile(path2):
|
|
return path2
|
|
raise FileNotFound("cannot find test package %s" % (test_pkg,))
|
|
|
|
def get_test_package():
|
|
test_pkg = "zlib-1.2.3-r1.tbz2"
|
|
return get_test_generic_package(test_pkg)
|
|
|
|
|
|
def get_test_entropy_package():
|
|
test_pkg = "sys-libs:zlib-1.2.3-r1~1.tbz2"
|
|
return get_test_generic_package(test_pkg)
|
|
|
|
def get_test_package_name():
|
|
return "zlib"
|
|
|
|
def get_test_package_atom():
|
|
return "sys-libs/zlib-1.2.3-r1" |