@@ -0,0 +1,1723 @@
+%22%22%22%0ATests Simulation class read method%0A%22%22%22%0Aimport os%0Aimport yaml%0Aimport numpy as np%0Afrom teemof import Simulation%0Afrom teemof.parameters import k_parameters%0A%0A%0Ak_ref_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'thermal-conductivity.yaml')%0Atime_ref_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'time.yaml')%0Atrial_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'ideal-mof-trial')%0Atrial_set_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'ideal-mof-trial-set')%0Arun_info_ref_file = os.path.join(trial_dir, 'Run1', 'run_info.yaml')%0Athermo_ref_file = os.path.join(trial_dir, 'Run1', 'thermo.yaml')%0Ak_est_iso_ref = %5B0.8624217134742657, 0.6839092609282974, 0.9263423943319228, 0.8656413422445915, 0.8983945996223535,%0A                 0.8802163796582159, 0.6416173216846418, 0.8356379755434158, 0.7098404203275488, 0.8686063495516347%5D%0A%0A%0Adef test_simulation_get_plot_data_for_run():%0A    %22%22%22Test Simulation class get_plot_data method for pulling correct data for different plots of a run%22%22%22%0A    k_par = k_parameters.copy()%0A    k_par%5B'read_thermo'%5D = True%0A    run_dir = os.path.join(trial_dir, 'Run1')%0A    sim = Simulation(read=run_dir, parameters=k_par, setup='run')%0A    with open(k_ref_file, 'r') as kref:%0A        k_ref = yaml.load(kref)%0A    with open(time_ref_file, 'r') as tiref:%0A        time_ref = yaml.load(tiref)%0A    with open(thermo_ref_file, 'r') as tref:%0A        thermo_ref = yaml.load(tref)%0A    assert sim.get_plot_data('thermo') == thermo_ref%0A    k_plot_data = sim.get_plot_data('k')%0A    assert k_plot_data%5B'x'%5D == time_ref%0A    assert k_plot_data%5B'y'%5D%5Bsim.run%5B'directions'%5D.index('x')%5D == k_ref%0A    assert k_plot_data%5B'legend'%5D == sim.run%5B'directions'%5D%0A

Add simulation get_plot_data test for a run