CYCAMORE
Loading...
Searching...
No Matches
helper Namespace Reference

Functions

 check_cmd (args, cwd, holdsrtn)
 
 cyclus_has_coin ()
 
 exit_times (agent_id, exit_table)
 
 find_ids (data, data_table, id_table)
 
 hasher (x)
 
 idx (h)
 
 run_cyclus (cyclus, cwd, in_path, out_path)
 
 table_exist (db, tables)
 

Variables

 CYCLUS_HAS_COIN = None
 
np sha1array = lambda x.array(idx(hasher(x)), np.uint32)
 
tuple str_types = (bytes, str)
 

Detailed Description

A set of tools for use in integration tests.

Function Documentation

◆ check_cmd()

helper.check_cmd ( args,
cwd,
holdsrtn )
Runs a command in a subprocess and verifies that it executed properly.

Definition at line 72 of file helper.py.

Referenced by run_cyclus().

◆ cyclus_has_coin()

helper.cyclus_has_coin ( )

Definition at line 89 of file helper.py.

◆ exit_times()

helper.exit_times ( agent_id,
exit_table )
Finds exit times of the specified agent from the exit table.

Definition at line 50 of file helper.py.

◆ find_ids()

helper.find_ids ( data,
data_table,
id_table )
Finds ids of the specified data located in the specified data_table,
and extracts the corresponding id from the specified id_table.

Definition at line 34 of file helper.py.

References sha1array.

Referenced by test_regression.TestRegression.find_ids().

◆ hasher()

helper.hasher ( x)

Definition at line 18 of file helper.py.

◆ idx()

helper.idx ( h)

Definition at line 21 of file helper.py.

◆ run_cyclus()

helper.run_cyclus ( cyclus,
cwd,
in_path,
out_path )
Runs cyclus with various inputs and creates output databases

Definition at line 63 of file helper.py.

References check_cmd().

◆ table_exist()

helper.table_exist ( db,
tables )
Checks if hdf5 database contains the specified tables.

Definition at line 29 of file helper.py.

Variable Documentation

◆ CYCLUS_HAS_COIN

helper.CYCLUS_HAS_COIN = None

Definition at line 10 of file helper.py.

◆ sha1array

np helper.sha1array = lambda x.array(idx(hasher(x)), np.uint32)

Definition at line 27 of file helper.py.

Referenced by find_ids().

◆ str_types

tuple helper.str_types = (bytes, str)

Definition at line 14 of file helper.py.