CYCAMORE
Functions | Variables
helper Namespace Reference

Functions

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

Variables

 CYCLUS_HAS_COIN = None
 
 sha1array = lambda x: np.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()

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

Definition at line 74 of file helper.py.

Referenced by run_cyclus().

◆ cyclus_has_coin()

def helper.cyclus_has_coin ( )

Definition at line 91 of file helper.py.

Referenced by test_run_inputs.test_inputs().

◆ exit_times()

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

Definition at line 52 of file helper.py.

◆ find_ids()

def 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 36 of file helper.py.

References sha1array.

Referenced by test_regression.TestRegression.find_ids().

◆ hasher()

def helper.hasher (   x)

Definition at line 20 of file helper.py.

References cycamore.int.

◆ idx()

def helper.idx (   h)

Definition at line 23 of file helper.py.

◆ run_cyclus()

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

Definition at line 65 of file helper.py.

References check_cmd().

Referenced by test_regression.TestRegression.setUp().

Here is the call graph for this function:

◆ table_exist()

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

Definition at line 31 of file helper.py.

Variable Documentation

◆ CYCLUS_HAS_COIN

helper.CYCLUS_HAS_COIN = None

Definition at line 12 of file helper.py.

◆ sha1array

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

Definition at line 29 of file helper.py.

Referenced by find_ids().

◆ str_types

tuple helper.str_types = (bytes, str)

Definition at line 16 of file helper.py.