This repository was archived by the owner on Feb 3, 2026. It is now read-only.
Open
Conversation
717751d to
b3feada
Compare
| @pytest.fixture | ||
| def start_binary(): | ||
| clear_octobot_previous_folders() | ||
| with TemporaryFile() as output, TemporaryFile() as err: |
tests/test_binary.py
Outdated
| terminate_binary(binary_process, output, err) | ||
|
|
||
|
|
||
| def create_binary(binary_options, output_file, err_file): |
Member
There was a problem hiding this comment.
should this function be named 'start_binary' ?
| preexec_fn=os.setsid if not is_on_windows() else None) | ||
|
|
||
|
|
||
| def terminate_binary(binary_process, output_file, err_file): |
tests/test_binary.py
Outdated
| with TemporaryFile() as output, TemporaryFile() as err: | ||
| binary_process = create_binary("", output, err) | ||
| yield | ||
| terminate_binary(binary_process, output, err) |
Member
There was a problem hiding this comment.
I think we should put this call in a finally
tests/test_binary.py
Outdated
| time.sleep(LOG_CONTENT_TEST_WAITING_TIME) | ||
| log_content = get_log_file_content() | ||
| logger.debug(log_content) | ||
| assert "BALANCE PROFITABILITY :" in log_content |
Member
There was a problem hiding this comment.
Maybe we could add while loop for the test_version_endpoint, test_evaluation_state_created and test_balance_profitability_updated instead of time.sleep() to speed up the test when possible ?
Member
Author
There was a problem hiding this comment.
I don't think that there is a lot of time to save, but it would be a great improvement.
b89d823 to
05c6a5c
Compare
217e782 to
4ea7304
Compare
45fbefb to
560bfb6
Compare
Herklos
commented
Mar 5, 2021
| finally: | ||
| logger.debug("Killing binary process...") | ||
| if is_on_windows(): | ||
| subprocess.call(["taskkill", "/F", "/IM", "OctoBot_windows.exe"]) |
|
|
||
| BINARY_DISABLE_WEB_OPTION = "-nw" | ||
| LOG_CHECKS_MAX_ATTEMPTS = 300 | ||
| DEFAULT_TIMEOUT_WINDOW = -95 |
a4f075f to
da2b75b
Compare
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.