# Path: pypet/tests/testutils/ioutils.py
# def get_root_logger():
#     """Returns root logger"""
#     return logging.getLogger()
# 
# def run_suite(remove=None, folder=None, suite=None):
#     """Runs a particular test suite or simply unittest.main.
# 
#     Takes care that all temporary data in `folder` is removed if `remove=True`.
# 
#     """
#     if remove is not None:
#         testParams['remove'] = remove
# 
#     testParams['user_tempdir'] = folder
# 
#     prepare_log_config()
# 
#     # Just signal if make_temp_dir works
#     make_temp_dir('tmp.txt', signal=True)
# 
#     success = False
#     try:
#         if suite is None:
#             unittest.main(verbosity=2)
#         else:
#             runner = unittest.TextTestRunner(verbosity=2)
#             result = runner.run(suite)
#             success = result.wasSuccessful()
#     finally:
#         remove_data()
# 
#     if not success:
#         # Exit with 1 if tests were not successful
#         sys.exit(1)
# 
# def parse_args():
#     """Parses arguments and returns a dictionary"""
#     opt_list, _ = getopt.getopt(sys.argv[1:],'k',['folder=', 'suite='])
#     opt_dict = {}
# 
#     for opt, arg in opt_list:
#         if opt == '-k':
#             opt_dict['remove'] = False
#             errwrite('I will keep all files.')
# 
#         if opt == '--folder':
#             opt_dict['folder'] = arg
#             errwrite('I will put all data into folder `%s`.' % arg)
# 
#         if opt == '--suite':
#             opt_dict['suite_no'] = arg
#             errwrite('I will run suite `%s`.' % arg)
# 
#     sys.argv = [sys.argv[0]]
#     return opt_dict


import sys
import unittest
import pypet
import logging
import inspect
from pypet import *
from pypet.tests.testutils.ioutils import get_root_logger, run_suite, parse_args
__author__ = 'Robert Meyer'



del test  # To not run all tests if this file is executed with nosetests



class TestAllImport(unittest.TestCase):

    tags = 'unittest', 'import'

    def test_import_star(self):
        for class_name in pypet.__all__:
            if class_name == 'test':
                continue
            logstr = 'Evaulauting %s: %s' % (class_name, repr(eval(class_name)))

# Path: pypet/tests/testutils/ioutils.py
# def get_root_logger():
#     """Returns root logger"""
#     return logging.getLogger()
# 
# def run_suite(remove=None, folder=None, suite=None):
#     """Runs a particular test suite or simply unittest.main.
# 
#     Takes care that all temporary data in `folder` is removed if `remove=True`.
# 
#     """
#     if remove is not None:
#         testParams['remove'] = remove
# 
#     testParams['user_tempdir'] = folder
# 
#     prepare_log_config()
# 
#     # Just signal if make_temp_dir works
#     make_temp_dir('tmp.txt', signal=True)
# 
#     success = False
#     try:
#         if suite is None:
#             unittest.main(verbosity=2)
#         else:
#             runner = unittest.TextTestRunner(verbosity=2)
#             result = runner.run(suite)
#             success = result.wasSuccessful()
#     finally:
#         remove_data()
# 
#     if not success:
#         # Exit with 1 if tests were not successful
#         sys.exit(1)
# 
# def parse_args():
#     """Parses arguments and returns a dictionary"""
#     opt_list, _ = getopt.getopt(sys.argv[1:],'k',['folder=', 'suite='])
#     opt_dict = {}
# 
#     for opt, arg in opt_list:
#         if opt == '-k':
#             opt_dict['remove'] = False
#             errwrite('I will keep all files.')
# 
#         if opt == '--folder':
#             opt_dict['folder'] = arg
#             errwrite('I will put all data into folder `%s`.' % arg)
# 
#         if opt == '--suite':
#             opt_dict['suite_no'] = arg
#             errwrite('I will run suite `%s`.' % arg)
# 
#     sys.argv = [sys.argv[0]]
#     return opt_dict


# Path: pypet/tests/unittests/module_test.py
import sys
import unittest
import pypet
import logging
import inspect
from pypet import *
from pypet.tests.testutils.ioutils import get_root_logger, run_suite, parse_args

__author__ = 'Robert Meyer'



del test  # To not run all tests if this file is executed with nosetests



class TestAllImport(unittest.TestCase):

    tags = 'unittest', 'import'

    def test_import_star(self):
        for class_name in pypet.__all__:
            if class_name == 'test':
                continue
            logstr = 'Evaulauting %s: %s' % (class_name, repr(eval(class_name)))

            get_root_logger().info(logstr)