Skip to content

Commit

Permalink
increase codecov patch - add agent reporters tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tpike3 committed Aug 29, 2020
1 parent 1c07c94 commit 7847f00
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_datacollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,20 @@ def test_agent_records(self):
Test agent-level variable collection.
"""
data_collector = self.model.datacollector
agent_table = data_collector.get_agent_vars_dataframe()

assert len(data_collector._agent_records) == 7
for step, records in data_collector._agent_records.items():
assert len(records) == 10
for values in records:
assert len(values) == 4

assert data_collector.get_agent_vars_dataframe().shape == (70, 2)
assert agent_table.shape == (70, 2)
assert 'value' in list(agent_table.columns)
assert "value2" in list(agent_table.columns)
assert "value3" not in list(agent_table.columns)

with self.assertRaises(Exception):
with self.assertRaises(KeyError):
data_collector._agent_records[8]

def test_table_rows(self):
Expand Down

0 comments on commit 7847f00

Please sign in to comment.