Esempio n. 1
0
from multiprocessing import Pool
from unittest.util import strclass

from .test_helpers import prefork, get_test_data_files

try:
    from unittest import mock
except ImportError:
    try:
        import mock
    except ImportError:
        raise RuntimeError("Needs 'mock' library for these tests.")

from flent import plotters, resultset, formatters
from flent.settings import parser, Settings, DEFAULT_SETTINGS
settings = parser.parse_args(args=[], namespace=Settings(DEFAULT_SETTINGS))

MATPLOTLIB_RC_VALUES = {
    'axes.axisbelow': True,
    'axes.color_cycle': ['#1b9e77', '#d95f02', '#7570b3', '#e7298a',
                         '#66a61e', '#e6ab02', '#a6761d', '#666666'],
    'axes.edgecolor': 'white',
    'axes.facecolor': '#EAEAF2',
    'axes.grid': True,
    'axes.labelcolor': '.15',
    'axes.linewidth': 0,
    'figure.edgecolor': 'white',
    'figure.facecolor': 'white',
    'figure.frameon': False,
    'grid.color': 'white',
    'grid.linestyle': '-',
Esempio n. 2
0
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from __future__ import absolute_import, division, print_function, unicode_literals

import os
import unittest

from flent.testenv import TEST_PATH
from flent.settings import parser, Settings, DEFAULT_SETTINGS
settings = parser.parse_args(namespace=Settings(DEFAULT_SETTINGS))


class TestTests(unittest.TestCase):

    def setUp(self):
        self.tests = sorted([os.path.splitext(i)[0]
                             for i in os.listdir(TEST_PATH)
                             if i.endswith('.conf')])
        self.settings = settings.copy()

    def test_load_tests(self):
        for t in self.tests:
            self.settings.load_test(t, informational=True)

test_suite = unittest.TestSuite(