Skip to content

Commit

Permalink
Adding new tables to Database test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbravo555 committed May 28, 2024
1 parent eafc920 commit b5a4300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions applications/RomApplication/tests/test_RomApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from test_save_rom_coefficients_process import TestSaveRomCoefficientsProcess
from test_hrom_training_utility_rom import TestHromTrainingUtilityRom
from test_rom_manager import TestRomManager
from test_rom_database import TestRomDatabase

def AssembleTestSuites():
''' Populates the test suites to run.
Expand Down Expand Up @@ -63,6 +64,8 @@ def AssembleTestSuites():
smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([TestSaveRomCoefficientsProcess]))
smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([TestHromTrainingUtilityRom]))
smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([TestRomManager]))
smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([TestRomDatabase]))


# - testNightly
nightlySuite = suites['nightly']
Expand Down
4 changes: 2 additions & 2 deletions applications/RomApplication/tests/test_rom_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_table_creation(self):
query = "SELECT name FROM sqlite_master WHERE type='table';"
tables = pd.read_sql_query(query, conn)
expected_tables = [
'FOM', 'ROM', 'HROM', 'RightBasis', 'SingularValues_Solution', 'LeftBasis', 'PetrovGalerkinSnapshots',
'ResidualsProjected', 'SingularValues_Residuals', 'HROM_Elements', 'HROM_Weights', 'Neural_Network'
'FOM','HROM','HROM_Elements','HROM_Weights','LeftBasis','Neural_Network','NonconvergedFOM','NonconvergedHROM','NonconvergedROM',
'PetrovGalerkinSnapshots','QoI_FOM','QoI_HROM','QoI_ROM','ROM','ResidualsProjected','RightBasis','SingularValues_Residuals','SingularValues_Solution'
]
self.assertEqual(sorted(tables['name']), sorted(expected_tables), "Not all expected tables were created.")
conn.close()
Expand Down

0 comments on commit b5a4300

Please sign in to comment.