simulations.tests package

Submodules

simulations.tests.test_modules module

Created on Thu Apr 1 14:36:02 2021

@author: gabrielsoto

class simulations.tests.test_modules.TestPySAMModules(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit tests for PySAM module setup

This testing suite is meant to test the methods in parent class of all modules, that being GenericSSCModule. Only non-abstract methods will be tested. All child classes will share common methods and attributes which will be tested here. Dispatch is NOT tested here.

For each individual class, there will be bespoke test classes.

setUp()[source]

Creating instances of modules upon start of each test

tearDown()[source]

Deleting instances of modules at end of each test

test__init__()[source]

Testing the shared processes in __init__ of all modules

test_create_Grid()[source]

Testing the create_Grid method

test_create_Plant()[source]

Testing the create_Plant method

test_create_SO()[source]

Testing the create_SO method

test_initialize_arrays()[source]

Testing the initialize_arrays method

test_log_SSC_arrays()[source]

Testing the log_SSC_arrays method

Here we test both instances of the method call, during simulations and during the last simulation segment.

test_reset_all()[source]

Testing the reset_all method

test_run_Plant_through_SSC()[source]

Testing the run_Plant_through_SSC method

test_run_sim()[source]

Testing run_sim for all modules

NOTE: this doesn’t test for accuracy of individual results, just that the processes run in the correct order and output something.

test_simulate_Plant()[source]

Testing the simulate_Plant method

Here we test the basic functionality of simulate Plant

test_store_csv_arrays()[source]

Testing the storage of csv arrays in all modules

NOTE: this assumes that the method was already called in __init__

simulations.tests.test_nuctes module

Created on Thu Apr 1 14:36:02 2021

@author: gabrielsoto

class simulations.tests.test_nuctes.TestNuclearTES(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit tests for Nuclear TES module

This testing suite is meant to test the nuclear TES module meant to represent Model 1 of the NE-2 project. This models an LFR plant supplying power to a power block with thermal energy storage (TES) in the form of molten salt tanks.

setUp()[source]

Creating instance of NuclearTES upon start of each test

tearDown()[source]

Deleting instance oself.nuctesf NuclearTES at end of each test

test_create_dispatch_params()[source]

Testing the creation of a parameter dictionary for NuclearDispatch

test_store_csv_arrays()[source]

Testing the storage of csv arrays in NuclearTES

NOTE: this assumes that the method was already called in __init__

simulations.tests.test_nuctes_scenarios module

Created on Mon Mar 21 14:39:17 2022

@author: gabrielsoto

class simulations.tests.test_nuctes_scenarios.TestNuclearTESScenarios(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit tests for Nuclear TES module

This testing suite is meant to test the nuclear TES module meant to represent Model 1 of the NE-2 project. This models an LFR plant supplying power to a power block with thermal energy storage (TES) in the form of molten salt tanks.

setUp()[source]

Creating instance of NuclearTES upon start of each test

tearDown()[source]

Deleting instance oself.nuctesf NuclearTES at end of each test

test_dispatch_revenue()[source]

Testing that dispatch increases revenue and operations

simulations.tests.test_util module

Created on Fri Apr 2 14:19:23 2021

@author: gabrielsoto

class simulations.tests.test_util.TestUtils(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit tests for PySAM utils

test_csvread()[source]

Testing csv file reading through pandas and subsequent conversion to arrays