File: TestBase.py

package info (click to toggle)
python-cdd 0.0.11
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 268 kB
  • ctags: 140
  • sloc: python: 1,041; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (3)
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)