test_exp_solve_tff.py 963 Bytes
Newer Older
valentin.emiya's avatar
valentin.emiya committed
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
31
32
33
# -*- coding: utf-8 -*-

"""Test of the module :module:`tffpy.experiments.exp_solve_tff`

.. moduleauthor:: Valentin Emiya
"""
import unittest

import matplotlib.pyplot as plt

from tffpy.experiments.exp_solve_tff import \
    SolveTffExperiment, create_and_run_light_experiment
from tffpy.tests.ci_config import create_config_files


class TestSolveTffExperiment(unittest.TestCase):
    def setUp(self):
        create_config_files()

    def test_light_experiment(self):
        create_and_run_light_experiment()

        light_exp = SolveTffExperiment.get_experiment(
            setting='light', force_reset=False)
        for idt in range(light_exp.n_tasks):
            light_exp.plot_task(idt=idt, fontsize=16)
            plt.close('all')
        light_exp.plot_results()

    def test_create_full_experiment(self):
        experiment = SolveTffExperiment.get_experiment(
            setting='full', force_reset=False)
        experiment.display_status()