Skip to content

Commit

Permalink
fixed table and field names in regression tests to new values
Browse files Browse the repository at this point in the history
  • Loading branch information
rwcarlsen committed Feb 27, 2014
1 parent 0eaacdb commit f04c833
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@

import tables

_invar_table_names = {"agents": "Agents",
_invar_table_names = {"agents": "AgentEntry",
"rsrcs": "Resources"}

_agent_key = "ID"
_agent_schema = ["AgentType", "ModelType", "Prototype", "ParentID", "EnterDate"]
_agent_key = "AgentId"
_agent_schema = ["Kind", "Implementation", "Prototype", "ParentId", "EnterTime"]

_agent_deaths_key = "AgentID"
_agent_deaths_schema = ["DeathDate"]
_agent_deaths_key = "AgentId"
_agent_deaths_schema = ["ExitTime"]

_simulation_time_info_schema = ["InitialYear", "InitialMonth", "SimulationStart",
_simulation_time_info_schema = ["InitialYear", "InitialMonth", "Start",
"Duration", "DecayInterval"]

_xaction_schema = ["SenderID", "ReceiverID", "ResourceID", "Commodity",
"Price", "Time"]
_xaction_schema = ["SenderId", "ReceiverId", "ResourceId", "Commodity",
"Time"]

_rsrc_key = "ID"
_rsrc_schema = ["Type", "TimeCreated", "Quantity", "units"]
_rsrc_key = "ResourceId"
_rsrc_schema = ["Type", "TimeCreated", "Quantity", "Units"]

_agent_id_names = ["ParentID", "SenderID", "ReceiverID"]
_rsrc_id_names = ["ResourceID"]
_agent_id_names = ["ParentId", "SenderId", "ReceiverId"]
_rsrc_id_names = ["ResourceId"]

class HDF5RegressionVisitor(object):
""" An HDF5RegressionVisitor visits a number of Cyclus HDF5 tables,
Expand All @@ -50,8 +50,8 @@ def _populate_agent_invariants(self):
name = _invar_table_names["agents"],
classname = "Table")
for row in table.iterrows():
a_id = row["ID"]
p_id = row["ParentID"]
a_id = row["AgentId"]
p_id = row["ParentId"]
p_invar = None
# print(p_id, a_id)
if p_id != -1:
Expand Down

0 comments on commit f04c833

Please sign in to comment.