forked from GEG-ETHZ/genGEO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testSuite.py
68 lines (64 loc) · 2.75 KB
/
testSuite.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Licensed under LGPL 2.1, please see LICENSE for details
# https://www.gnu.org/licenses/lgpl-2.1.html
#
# The work on this project has been performed at the GEG Group at ETH Zurich:
# --> https://geg.ethz.ch
#
# The initial version of this file has been implemented by:
#
# Philipp Schaedle (https://github.com/philippschaedle)
# Benjamin M. Adams
#
# Further changes are done by:
#
############################
import sys
import unittest
from tests.semiAnalyticalWellTest import *
from tests.reservoirDepletionTest import *
from tests.oRCCycleTboilTest import *
from tests.oRCCycleSupercritPboilTest import *
from tests.heatExchangerTest import *
from tests.fluidSystemWaterTest import *
from tests.fluidSystemCO2Test import *
def testSuite(full=False):
suite = unittest.TestSuite()
# semi-analytical well
suite.addTest(SemiAnalyticalWellTest('testProductionWell'))
suite.addTest(SemiAnalyticalWellTest('testInjectionWellWater'))
suite.addTest(SemiAnalyticalWellTest('testInjectionWellCO2'))
suite.addTest(SemiAnalyticalWellTest('testInjectionWellCO2HighQ'))
suite.addTest(SemiAnalyticalWellTest('testInjectionWellCO2SmallWellR'))
# reservoir
suite.addTest(ReservoirDepletionTest('testDepletionCurve'))
suite.addTest(ReservoirDepletionTest('testNoTransient'))
suite.addTest(ReservoirDepletionTest('testTransientPNoT'))
suite.addTest(ReservoirDepletionTest('testTransientPT'))
suite.addTest(ReservoirDepletionTest('testTransientTNoP'))
# ORC cycles
suite.addTest(ORCCycleTboilTest('testParasiticPowerFraction'))
suite.addTest(ORCCycleTboilTest('testORCCycleTboil'))
suite.addTest(ORCCycleTboilTest('testORCCycleTboilFail'))
suite.addTest(ORCCycleSupercritPboilTest('testORCCycleSupercritPboil'))
# heat exchanger
suite.addTest(HeatExchangerTest('testHeatExchanger'))
suite.addTest(HeatExchangerTest('testHeatExchangerOptMdot'))
# fluidsystem Water
suite.addTest(FluidSystemWaterTest('testFluidSystemWaterSolverMdot1'))
suite.addTest(FluidSystemWaterTest('testFluidSystemWaterSolverMdot40'))
# fluidsystem CO2
suite.addTest(FluidSystemCO2Test('testFluidSystemCO2Mdot10'))
suite.addTest(FluidSystemCO2Test('testFluidSystemCO2Mdot80'))
suite.addTest(FluidSystemCO2Test('testFluidSystemCO2Mdot200'))
suite.addTest(FluidSystemCO2Test('testFluidSystemCO2Mdot100'))
# heavy tests only if full test is run
if full:
suite.addTest(FluidSystemWaterTest('testFluidSystemWaterSolverOptMdot'))
suite.addTest(FluidSystemCO2Test('testFluidSystemCO2SolverOptMdot'))
return suite
if __name__ == '__main__':
runner = unittest.TextTestRunner(verbosity=2)
if sys.argv[-1].lower() == 'full':
runner.run(testSuite(full=True))
else:
runner.run(testSuite())