Files
entropy/libraries/tests/_misc.py
2009-04-16 06:04:33 +02:00

12 lines
388 B
Python

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,))