Skip to content

Commit

Permalink
fix: broken assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
gmega committed Jan 6, 2025
1 parent 59dcba5 commit 48a1d1a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions benchmarks/core/experiments/tests/test_static_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ def leech(self, handle: MockHandle):
return MockDownloadHandle(self)

def remove(self, handle: MockHandle):
assert self.seeding is not None
assert self.leeching == handle or self.seeding[0] == handle
if self.leeching is not None:
assert self.leeching == handle
elif self.seeding is not None:
assert self.seeding[0] == handle
else:
raise Exception('Either leech or seed must be called before attempting a remove')

self.remove_was_called = True


Expand Down

0 comments on commit 48a1d1a

Please sign in to comment.