Skip to content

Commit

Permalink
runs black over the code
Browse files Browse the repository at this point in the history
  • Loading branch information
p-ferreira committed Nov 20, 2023
1 parent 23e64a1 commit aabdadd
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tests/validators/reward/test_reward_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,19 @@ def test_parse_reward_events_with_reward_events(self):
events = [event1, event2]

# Expected result
expected = {
'reward': (1, 2),
'normalized_reward': ('event1', 'event2')
}
expected = {"reward": (1, 2), "normalized_reward": ("event1", "event2")}

# Call the function and check if the result matches the expected output
result = reward.reward.BaseRewardEvent.parse_reward_events(events)
# Call the function and check if the result matches the expected output
result = reward.reward.BaseRewardEvent.parse_reward_events(events)
self.assertEqual(result, expected)


def test_parse_reward_events_with_no_reward_events(self):
# Test with None
result_none = reward.reward.BaseRewardEvent.parse_reward_events(None)
self.assertTrue(all(len(lst) == 0 for lst in result_none.values()))
self.assertEqual(result_none, {'reward': [], 'normalized_reward': []})
self.assertEqual(result_none, {"reward": [], "normalized_reward": []})

# Test with empty list
result_empty = reward.reward.BaseRewardEvent.parse_reward_events([])
self.assertTrue(all(len(lst) == 0 for lst in result_empty.values()))
self.assertEqual(result_empty, {'reward': [], 'normalized_reward': []})

self.assertEqual(result_empty, {"reward": [], "normalized_reward": []})

0 comments on commit aabdadd

Please sign in to comment.