feat: Update virtual_machine_instance.py with class generator #2644
manage-repositories-app / tox
succeeded
Feb 12, 2026 in 0s
Tox
Details
warning: `VIRTUAL_ENV=unittests` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
Using CPython 3.14.2 interpreter at: /usr/bin/python3
Creating virtual environment at: .venv
Building openshift-python-wrapper @ file:///tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24
Built openshift-python-wrapper @ file:///tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24
Installed 133 packages in 77ms
unittests: install_deps /tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24> python -I -m pip install uv
unittests: commands[0] /tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24> uv run --group tests pytest
============================= test session starts ==============================
platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0
cachedir: unittests/.pytest_cache
rootdir: /tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24
configfile: pyproject.toml
plugins: cov-7.0.0, anyio-4.12.1
collected 644 items
class_generator/tests/test_batch_regeneration.py .................... [ 3%]
class_generator/tests/test_class_generator.py . [ 3%]
class_generator/tests/test_cli.py ................. [ 5%]
class_generator/tests/test_resource_discovery.py ................... [ 8%]
class_generator/tests/test_schema_new_functions.py ..................... [ 12%]
........................................................................ [ 23%]
........ [ 24%]
class_generator/tests/test_schema_parsing.py .............. [ 26%]
class_generator/tests/test_user_code_parser.py ....... [ 27%]
class_generator/tests/test_utils.py ................... [ 30%]
mcp_server/tests/test_server.py ....................... [ 34%]
tests/test_api_group_order.py . [ 34%]
tests/test_camelcase_to_snake.py .......... [ 36%]
tests/test_resource.py ............................xx [ 40%]
tests/test_resource_validation.py ................. [ 43%]
tests/test_resources/test_aaq.py .... [ 43%]
tests/test_resources/test_api_server.py .... [ 44%]
tests/test_resources/test_authorino.py .... [ 45%]
tests/test_resources/test_cdi.py .... [ 45%]
tests/test_resources/test_cdi_config.py .... [ 46%]
tests/test_resources/test_cluster_resource_quota.py .... [ 47%]
tests/test_resources/test_cluster_user_defined_network.py .... [ 47%]
tests/test_resources/test_config_map.py .... [ 48%]
tests/test_resources/test_console_config_openshift_io.py .... [ 48%]
tests/test_resources/test_console_operator_openshift_io.py .... [ 49%]
tests/test_resources/test_csi_driver.py .... [ 50%]
tests/test_resources/test_data_import_cron.py .... [ 50%]
tests/test_resources/test_data_science_cluster.py .... [ 51%]
tests/test_resources/test_deployment.py .... [ 52%]
tests/test_resources/test_direct_volume_migration.py .... [ 52%]
tests/test_resources/test_direct_volume_migration_progress.py .... [ 53%]
tests/test_resources/test_dns_config_openshift_io.py .... [ 53%]
tests/test_resources/test_dns_operator_openshift_io.py .... [ 54%]
tests/test_resources/test_dsc_initialization.py .... [ 55%]
tests/test_resources/test_group.py .... [ 55%]
tests/test_resources/test_guardrails_orchestrator.py .... [ 56%]
tests/test_resources/test_image_caching_internal_knative_dev.py .... [ 56%]
tests/test_resources/test_image_config_openshift_io.py .... [ 57%]
tests/test_resources/test_image_content_source_policy.py .... [ 58%]
tests/test_resources/test_image_image_openshift_io.py .... [ 58%]
tests/test_resources/test_inference_graph.py .... [ 59%]
tests/test_resources/test_kube_descheduler.py .... [ 60%]
tests/test_resources/test_kubelet_config.py .... [ 60%]
tests/test_resources/test_kubevirt.py .... [ 61%]
tests/test_resources/test_llama_stack_distribution.py .... [ 61%]
tests/test_resources/test_lm_eval_job.py .... [ 62%]
tests/test_resources/test_machine.py .... [ 63%]
tests/test_resources/test_maria_db.py .... [ 63%]
tests/test_resources/test_mariadb_operator.py .... [ 64%]
tests/test_resources/test_mig_analytic.py .... [ 65%]
tests/test_resources/test_mig_cluster.py .... [ 65%]
tests/test_resources/test_mig_migration.py .... [ 66%]
tests/test_resources/test_mig_plan.py .... [ 66%]
tests/test_resources/test_model_registry.py .... [ 67%]
tests/test_resources/test_model_registry_components_platform_opendatahub_io.py . [ 67%]
... [ 68%]
tests/test_resources/test_model_registry_modelregistry_opendatahub_io.py . [ 68%]
... [ 68%]
tests/test_resources/test_mtq.py .... [ 69%]
tests/test_resources/test_namespace.py .... [ 70%]
tests/test_resources/test_network_config_openshift_io.py .... [ 70%]
tests/test_resources/test_network_operator_openshift_io.py .... [ 71%]
tests/test_resources/test_nm_state.py .... [ 71%]
tests/test_resources/test_node.py .... [ 72%]
tests/test_resources/test_node_config_openshift_io.py .... [ 73%]
tests/test_resources/test_node_network_configuration_policy_latest.py .. [ 73%]
.. [ 73%]
tests/test_resources/test_notebook.py .... [ 74%]
tests/test_resources/test_oauth.py .... [ 75%]
tests/test_resources/test_operator.py .... [ 75%]
tests/test_resources/test_pod.py .... [ 76%]
tests/test_resources/test_pod_metrics.py .... [ 76%]
tests/test_resources/test_project_config_openshift_io.py .... [ 77%]
tests/test_resources/test_project_project_openshift_io.py .... [ 78%]
tests/test_resources/test_project_request.py ... [ 78%]
tests/test_resources/test_prometheus.py .... [ 79%]
tests/test_resources/test_replica_set.py .... [ 79%]
tests/test_resources/test_scheduler.py .... [ 80%]
tests/test_resources/test_security_context_constraints.py .... [ 81%]
tests/test_resources/test_self_subject_review.py .... [ 81%]
tests/test_resources/test_service.py .... [ 82%]
tests/test_resources/test_service_mesh_member.py .... [ 82%]
tests/test_resources/test_service_serving_knative_dev.py .... [ 83%]
tests/test_resources/test_serving_runtime.py .... [ 84%]
tests/test_resources/test_snapshot.py .... [ 84%]
tests/test_resources/test_ssp.py .... [ 85%]
tests/test_resources/test_storage_cluster.py .... [ 86%]
tests/test_resources/test_user.py .... [ 86%]
tests/test_resources/test_user_defined_network.py .... [ 87%]
tests/test_resources/test_virtual_machine_cluster_instancetype.py .... [ 87%]
tests/test_resources/test_virtual_machine_cluster_preference.py .... [ 88%]
tests/test_resources/test_virtual_machine_export.py .... [ 89%]
tests/test_resources/test_virtual_machine_instance_migration.py .... [ 89%]
tests/test_resources/test_virtual_machine_instance_preset.py .... [ 90%]
tests/test_resources/test_virtual_machine_instance_replica_set.py .... [ 90%]
tests/test_resources/test_virtual_machine_instancetype.py .... [ 91%]
tests/test_resources/test_virtual_machine_preference.py .... [ 92%]
tests/test_resources/test_volume_snapshot.py .... [ 92%]
tests/test_resources/test_volume_snapshot_class.py .... [ 93%]
tests/test_schema_loading.py .............. [ 95%]
tests/test_unittests.py ........... [ 97%]
tests/test_validate_resources.py . [ 97%]
tests/test_validate_resources_script.py .......... [ 99%]
tests/test_validation_error.py ...... [100%]
=============================== warnings summary ===============================
.venv/lib64/python3.14/site-packages/cloup/_util.py:10
/tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24/.venv/lib64/python3.14/site-packages/cloup/_util.py:10: DeprecationWarning: The '__version__' attribute is deprecated and will be removed in Click 9.1. Use feature detection or 'importlib.metadata.version("click")' instead.
click_version_tuple = tuple(click.__version__.split('.'))
../../usr/lib64/python3.14/importlib/__init__.py:88
/usr/lib64/python3.14/importlib/__init__.py:88: DeprecationWarning: model_registry.py module will be removed in the next release, please import `ModelRegistry` from model_registry_modelregistry_opendatahub_io.py or model_registry_components_platform_opendatahub_io.py instead
return _bootstrap._gcd_import(name[level:], package, level)
tests/scripts/generate_pytest_test.py:82
/tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24/tests/scripts/generate_pytest_test.py:82: PytestCollectionWarning: cannot collect test class 'TestCoverageAnalyzer' because it has a __init__ constructor (from: tests/scripts/generate_pytest_test.py)
class TestCoverageAnalyzer:
tests/test_resource_validation.py: 2 warnings
tests/test_schema_loading.py: 12 warnings
/tmp/github-webhook-openshift-python-wrapper-n4z7_rpj-worktree-2ec342b1-f84a-43f1-a1f2-5d534bdbbc24/ocp_resources/utils/schema_validator.py:158: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.
resolver = jsonschema.RefResolver(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.14.2-final-0 ________________
Name Stmts Miss Cover
---------------------------------------------------------------------
class_generator/cli.py 261 48 82%
class_generator/constants.py 14 0 100%
class_generator/core/coverage.py 110 10 91%
class_generator/core/discovery.py 128 35 73%
class_generator/core/generator.py 97 34 65%
class_generator/core/schema.py 800 244 70%
class_generator/exceptions.py 6 0 100%
class_generator/formatters/file_writer.py 17 4 76%
class_generator/formatters/template_renderer.py 24 3 88%
class_generator/parsers/explain_parser.py 77 7 91%
class_generator/parsers/type_parser.py 77 5 94%
class_generator/parsers/user_code_parser.py 49 10 80%
class_generator/utils.py 186 32 83%
fake_kubernetes_client/__init__.py 10 0 100%
fake_kubernetes_client/configuration.py 17 0 100%
fake_kubernetes_client/dynamic_client.py 43 13 70%
fake_kubernetes_client/exceptions.py 34 32 6%
fake_kubernetes_client/kubernetes_client.py 12 4 67%
fake_kubernetes_client/resource_field.py 75 18 76%
fake_kubernetes_client/resource_instance.py 174 34 80%
fake_kubernetes_client/resource_manager.py 35 17 51%
fake_kubernetes_client/resource_registry.py 142 49 65%
fake_kubernetes_client/resource_storage.py 119 43 64%
fake_kubernetes_client/status_schema_parser.py 228 88 61%
fake_kubernetes_client/status_templates.py 103 33 68%
---------------------------------------------------------------------
TOTAL 2838 763 73%
5 empty files skipped.
Coverage HTML written to dir .tests_coverage
Required test coverage of 65.0% reached. Total coverage: 73.11%
================= 642 passed, 2 xfailed, 17 warnings in 12.06s =================
unittests: OK (17.65=setup[0.93]+cmd[16.72] seconds)
congratulations :) (17.66 seconds)
Loading