Example #1
0
import os
import sys

# Add parent directory to path to make test aware of other modules
pardir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.append(pardir)

import safe
from safe.common.utilities import setup_logger
setup_logger()
Example #2
0
# Rely on our friends from numpy on the nose tests utils
from numpy.testing import Tester
from safe.common import utilities
from safe.common.version import get_version

# Note - the version string is obtained in safe.common.version
#        and stored in metadata.txt

utilities.setup_logger()


# FIXME (Ole): I don't like this because it mixes test and production code.
#              What is the rationale
class SafeTester(Tester):
    def _show_system_info(self):
        print 'safe version %s' % get_version()
        super(SafeTester, self)._show_system_info()

test = SafeTester().test