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.
Test progress on parent operation #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Test progress on parent operation #307
Changes from all commits
8fe5d71File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check failure on line 140 in tests/copy_test.py
copy_test.test_multi_copy_parent_progress
Raw output
storage_path = 'python_client_tests/test-multi-copy-parent-progress' client = <ansys.hps.data_transfer.client.client.Client object at 0x7ff33ff60f70> def test_multi_copy_parent_progress(storage_path, client): """Test progress of parent operation when copying multiple files.""" api = DataTransferApi(client) api.status(wait=True) operations = [] for _ in range(3): with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp_file: temp_file.write("Mock file") temp_file_name = os.path.basename(temp_file.name) src = StoragePath(path=temp_file.name, remote="local") dst = StoragePath(path=f"{storage_path}/{temp_file_name}") operations.append(SrcDst(src=src, dst=dst)) op = api.copy(operations) assert op.id is not None # test progress handler progress_history = [] def handler(ops): for o in ops: if o.id == op.id: progress_history.append(o.progress) op = api.wait_for(op.id, interval=0.05, handler=handler) assert op[0].state == OperationState.Succeeded, op[0].messages > assert None not in progress_history, f"{progress_history=}" E AssertionError: progress_history=[None, None, 1.0] E assert None not in [None, None, 1.0] tests/copy_test.py:140: AssertionErrorUh oh!
There was an error while loading. Please reload this page.