-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update fixed rate profile generator, add tests, set up initial execut…
…or test
- Loading branch information
Showing
3 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from unittest.mock import MagicMock | ||
from src.guidellm.backend.base import Backend | ||
from src.guidellm.executor.executor import Executor | ||
from src.guidellm.request.base import RequestGenerator | ||
|
||
def test_executor_creation(): | ||
mock_request_generator = MagicMock(spec=RequestGenerator) | ||
mock_backend = MagicMock(spec=Backend) | ||
rate_type = "sweep" | ||
profile_args = None | ||
max_requests = None, | ||
max_duration = None, | ||
executor = Executor(mock_request_generator, mock_backend, rate_type, profile_args, max_requests, max_duration); | ||
assert executor.request_generator == mock_request_generator | ||
assert executor.backend == mock_backend | ||
assert executor.max_requests == max_requests | ||
assert executor.max_duration == max_duration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters