Files
entropy/libraries/tests/_misc.py
2009-04-17 07:01:09 +00:00

19 lines
526 B
Python

# -*- coding: utf-8 -*-
import os
from entropy.exceptions import FileNotFound
def get_test_package():
test_pkg = "zlib-1.2.3-r1.tbz2"
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_name():
return "zlib"
def get_test_package_atom():
return "sys-libs/zlib-1.2.3-r1"