1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
##########################################################################
#
# TestBase.py: a common test class for our specific needs
#
# Python-CDD is a library to make easier to build applications to
# Custom Debian Distributions.
# See http://projetos.ossystems.com.br/python-cdd for more information.
#
# ====================================================================
# Copyright (c) 2002-2005 O.S. Systems. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
#########################################################################
# Author: Otavio Salvador <otavio@ossystems.com.br>
from unittest import TestCase
from os.path import abspath, join, dirname
import sys
class TestBase(TestCase):
def aux_file(self, filename):
current_dir = abspath(dirname(sys.argv[0]))
if not current_dir.endswith('tests'):
current_dir += '/tests'
return join(current_dir, 'aux', filename)
|