Skip to content
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

Clean up test_create_job in cirq-google/cirq_google/engine/engine_client_test.py #6761

Closed
senecameeks opened this issue Oct 10, 2024 · 0 comments · Fixed by #6885
Closed
Labels
kind/health For CI/testing/release process/refactoring/technical debt items

Comments

@senecameeks
Copy link
Collaborator

Test_create_job tests successful job creation as well as when a job creation throws an error. Separate these assertions into separate tests and make their names more descriptive (e.g follow python unit test naming convention style guide)

@senecameeks senecameeks added the kind/health For CI/testing/release process/refactoring/technical debt items label Oct 10, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 18, 2025
…y and consistency (#6885)

Split initial `test_create_job` test into:
- Four successful tests:
  - `test_create_job_with_all_parameters`
  - `test_create_job_without_labels`
  - `test_create_job_without_description`
  - `test_create_job_without_specified_job_id`
- One failure test:
  - `test_create_job_with_invalid_priority`

*Note: Splitting successful tests to stay consistent with existing
tests:*
-
*`test_create_job_with_invalid_processor_and_device_config_arguments_throws`*
  - *`test_create_job_with_run_name_and_device_config_name_succeeds`*

EDIT: Also refactored the test cases to use pytest fixtures for
`default_run_context` and `default_engine_client` for consistency and to
reduce redundancy.

Fixes #6761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/health For CI/testing/release process/refactoring/technical debt items
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants