CYCAMORE
Loading...
Searching...
No Matches
test_regression.TestRegression Class Reference
Inheritance diagram for test_regression.TestRegression:
test_regression.TestDeployInst test_regression.TestDynamicCapacitated test_regression.TestGrowth1 test_regression.TestGrowth2 test_regression._PhysorEnrichment test_regression._PhysorSources test_regression._Recycle test_regression.TestCBCPhysorEnrichment test_regression.TestGreedyPhysorEnrichment test_regression.TestCBCPhysorSources test_regression.TestGreedyPhysorSources test_regression.TestCBCRecycle test_regression.TestGreedyRecycle

Public Member Functions

 find_ids (cls, spec, a, spec_col="Spec", id_col="AgentId")
 
 setup_class (cls, inf)
 
 teardown_class (cls)
 
 to_ary (cls, a, k)
 

Public Attributes

 agent_entry = f.get_node("/AgentEntry")[:]
 
str agent_exit
 
 compositions = f.get_node("/Compositions")[:]
 
 conn = sqlite3.connect(cls.outf)
 
 cur = cls.conn.cursor()
 
str enrichments
 
str ext = '.sqlite'
 
 inf = inf
 
 info = f.get_node("/Info")[:]
 
str outf = str(uuid.uuid4()) + cls.ext
 
 resources = f.get_node("/Resources")[:]
 
dict rsrc_qtys
 
 transactions = f.get_node("/Transactions")[:]
 

Detailed Description

A base class for all regression tests. A derived class is required for
each new input file to be tested. Each derived class *must* declare an `inf`
member in their `__init__` function that points to the input file to be
tested, e.g., `self.inf_ = ./path/to/my/input_file.xml. See below for
examples.

Definition at line 30 of file test_regression.py.

Member Function Documentation

◆ find_ids()

test_regression.TestRegression.find_ids ( cls,
spec,
a,
spec_col = "Spec",
id_col = "AgentId" )

◆ setup_class()

◆ teardown_class()

test_regression.TestRegression.teardown_class ( cls)

◆ to_ary()

Member Data Documentation

◆ agent_entry

◆ agent_exit

str test_regression.TestRegression.agent_exit
Initial value:
= f.get_node("/AgentExit")[:] \
if "/AgentExit" in f \
else None

Definition at line 52 of file test_regression.py.

◆ compositions

test_regression.TestRegression.compositions = f.get_node("/Compositions")[:]

Definition at line 60 of file test_regression.py.

◆ conn

test_regression.TestRegression.conn = sqlite3.connect(cls.outf)

Definition at line 65 of file test_regression.py.

Referenced by teardown_class().

◆ cur

test_regression.TestRegression.cur = cls.conn.cursor()

Definition at line 67 of file test_regression.py.

◆ enrichments

str test_regression.TestRegression.enrichments
Initial value:
= f.get_node("/Enrichments")[:] \
if "/Enrichments" in f \
else None

Definition at line 55 of file test_regression.py.

Referenced by test_regression._PhysorEnrichment.test_nu(), and test_regression._PhysorEnrichment.test_swu().

◆ ext

str test_regression.TestRegression.ext = '.sqlite'

Definition at line 39 of file test_regression.py.

Referenced by find_ids(), teardown_class(), and to_ary().

◆ inf

test_regression.TestRegression.inf = inf

Definition at line 41 of file test_regression.py.

◆ info

test_regression.TestRegression.info = f.get_node("/Info")[:]

Definition at line 61 of file test_regression.py.

◆ outf

test_regression.TestRegression.outf = str(uuid.uuid4()) + cls.ext

◆ resources

test_regression.TestRegression.resources = f.get_node("/Resources")[:]

Definition at line 58 of file test_regression.py.

◆ rsrc_qtys

dict test_regression.TestRegression.rsrc_qtys
Initial value:
= {
x["ResourceId"]: x["Quantity"] for x in cls.resources}

Definition at line 62 of file test_regression.py.

Referenced by test_regression._PhysorSources.test_rxtr2_xactions(), test_regression._PhysorSources.test_rxtr3_xactions(), and test_regression._PhysorEnrichment.test_xactions2().

◆ transactions

test_regression.TestRegression.transactions = f.get_node("/Transactions")[:]

The documentation for this class was generated from the following file: