-
Notifications
You must be signed in to change notification settings - Fork 236
[cueadmin] Enhance testing infrastructure, tooling, and documentation #1982
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
Merged
ramonfigueiredo
merged 4 commits into
AcademySoftwareFoundation:master
from
ramonfigueiredo:enhance-cueadmin-testing-infrastructure
Sep 24, 2025
Merged
[cueadmin] Enhance testing infrastructure, tooling, and documentation #1982
ramonfigueiredo
merged 4 commits into
AcademySoftwareFoundation:master
from
ramonfigueiredo:enhance-cueadmin-testing-infrastructure
Sep 24, 2025
Conversation
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
- Update pyproject.toml with modern pytest configuration
* Add pytest markers for unit, integration, and slow tests
* Enable verbose output and strict marker validation
* Upgrade test dependencies to pytest > = 8.0.0, pytest-cov > = 4.0.0
* Add dev dependencies with linting tools (pylint, black, isort)
* Configure comprehensive coverage reporting with exclusions
- Add tox.ini for multi-environment testing
* Support Python 3.8-3.13 testing environments
* Include lint, coverage, and code formatting environments
* Enable CI/CD integration with format checking
- Enhance README.md with comprehensive testing documentation
* Add detailed testing section with quick start guide
* Document test infrastructure and dependencies
* Include coverage reporting and development workflows
* Add CI/CD integration examples and contributing guidelines
* Provide multiple testing scenarios and usage examples
- Improve project quality standards
* Align with cueman testing infrastructure standards
* Enable modern testing practices and tooling
* Support professional development workflows
* Integrate with OpenCue CI/CD pipeline
* Support for coverage reporting (--coverage, --html) * Verbose and quick test modes * Colored output for better readability * Dependency checking for pytest and pytest-cov * Environment information display * Help documentation with usage examples
* Add "Development and Testing" section to cueadmin reference docs * Add "Development and Contributing" section to cueadmin tutorial * Include information test suite, pytest usage, and CI/CD integration * Align cueadmin documentation structure with cueman documentation * Update navigation links to development resources
Both black and isort ran and made changes: - isort fixed import ordering in 8 files - black reformatted 8 files for consistent code style - 3 files were already properly formatted and left unchanged
Collaborator
Author
cd cueadmin
./run_tests.sh [INFO] Python version: Python 3.13.2
[INFO] pytest version: pytest 8.4.2
[INFO] Test directory: /Users/rfigueiredo/github/OpenCue/cueadmin
[INFO] Running: python -m pytest -v tests/
==========================================
=============================================================================================================================================== test session starts ===============================================================================================================================================
cachedir: .pytest_cache
configfile: pyproject.toml
plugins: mock-3.15.1, pyfakefs-5.9.3, cov-7.0.0
collected 76 items
tests/test_common.py::CommonArgTests::testSetFacility PASSED [ 1%]
tests/test_common.py::CommonArgTests::testSetServer PASSED [ 2%]
tests/test_common.py::CommonArgTests::testVerboseLogging PASSED [ 3%]
tests/test_common.py::ShowTests::testCreateShow PASSED [ 5%]
tests/test_common.py::ShowTests::testDefaultMaxCores PASSED [ 6%]
tests/test_common.py::ShowTests::testDefaultMinCores PASSED [ 7%]
tests/test_common.py::ShowTests::testDeleteShow PASSED [ 9%]
tests/test_common.py::ShowTests::testDisableBooking PASSED [ 10%]
tests/test_common.py::ShowTests::testDisableDispatch PASSED [ 11%]
tests/test_common.py::ShowTests::testDisableShow PASSED [ 13%]
tests/test_common.py::ShowTests::testEnableBooking PASSED [ 14%]
tests/test_common.py::ShowTests::testEnableDispatch PASSED [ 15%]
tests/test_common.py::ShowTests::testEnableShow PASSED [ 17%]
tests/test_common.py::ShowTests::testListShows PASSED [ 18%]
tests/test_common.py::AllocTests::testCreateAlloc PASSED [ 19%]
tests/test_common.py::AllocTests::testDeleteAlloc PASSED [ 21%]
tests/test_common.py::AllocTests::testInvalidRenameAlloc PASSED [ 22%]
tests/test_common.py::AllocTests::testListAllocs PASSED [ 23%]
tests/test_common.py::AllocTests::testListSubscriptionsForAlloc PASSED [ 25%]
tests/test_common.py::AllocTests::testRenameAlloc PASSED [ 26%]
tests/test_common.py::AllocTests::testReparentHosts PASSED [ 27%]
tests/test_common.py::AllocTests::testTagAlloc PASSED [ 28%]
tests/test_common.py::HostTests::testDeleteHost PASSED [ 30%]
tests/test_common.py::HostTests::testInvalidDeleteHost PASSED [ 31%]
tests/test_common.py::HostTests::testInvalidLockHost PASSED [ 32%]
tests/test_common.py::HostTests::testInvalidMoveHost PASSED [ 34%]
tests/test_common.py::HostTests::testInvalidSafeReboot PASSED [ 35%]
tests/test_common.py::HostTests::testInvalidSetFixed PASSED [ 36%]
tests/test_common.py::HostTests::testInvalidSetRepairState PASSED [ 38%]
tests/test_common.py::HostTests::testInvalidSetThreadMode PASSED [ 39%]
tests/test_common.py::HostTests::testInvalidUnlockHost PASSED [ 40%]
tests/test_common.py::HostTests::testListHosts PASSED [ 42%]
tests/test_common.py::HostTests::testLockHost PASSED [ 43%]
tests/test_common.py::HostTests::testMoveHost PASSED [ 44%]
tests/test_common.py::HostTests::testSafeReboot PASSED [ 46%]
tests/test_common.py::HostTests::testSetFixed PASSED [ 47%]
tests/test_common.py::HostTests::testSetRepairState PASSED [ 48%]
tests/test_common.py::HostTests::testSetThreadMode PASSED [ 50%]
tests/test_common.py::HostTests::testUnlockHost PASSED [ 51%]
tests/test_common.py::SubscriptionTests::testCreateSub PASSED [ 52%]
tests/test_common.py::SubscriptionTests::testDeleteSub PASSED [ 53%]
tests/test_common.py::SubscriptionTests::testListSubs PASSED [ 55%]
tests/test_common.py::SubscriptionTests::testSetBurst PASSED [ 56%]
tests/test_common.py::SubscriptionTests::testSetBurstPercentage PASSED [ 57%]
tests/test_common.py::SubscriptionTests::testSetSize PASSED [ 59%]
tests/test_common.py::JobTests::testListJobInfo PASSED [ 60%]
tests/test_common.py::JobTests::testListJobs PASSED [ 61%]
tests/test_common.py::ProcTests::testListFrameLogPaths PASSED [ 63%]
tests/test_common.py::ProcTests::testListProcs PASSED [ 64%]
tests/test_common.py::ServiceTests::testListDefaultServices PASSED [ 65%]
tests/test_common.py::ServiceTests::testListShowServices PASSED [ 67%]
tests/test_format.py::FmtTests::test_cutoff_edge_cases PASSED [ 68%]
tests/test_format.py::FmtTests::test_find_duration_with_mocked_time PASSED [ 69%]
tests/test_format.py::FmtTests::test_format_duration_precision_edge_cases PASSED [ 71%]
tests/test_format.py::FmtTests::test_format_duration_with_extreme_values PASSED [ 72%]
tests/test_format.py::FmtTests::test_format_duration_with_floating_point PASSED [ 73%]
tests/test_format.py::FmtTests::test_format_long_duration_precision_edge_cases PASSED [ 75%]
tests/test_format.py::FmtTests::test_format_long_duration_with_extreme_values PASSED [ 76%]
tests/test_format.py::FmtTests::test_format_long_duration_with_floating_point PASSED [ 77%]
tests/test_format.py::FmtTests::test_format_mem_conversion_precision PASSED [ 78%]
tests/test_format.py::FmtTests::test_format_mem_force_unit_edge_cases PASSED [ 80%]
tests/test_format.py::FmtTests::test_format_mem_with_decimal_inputs PASSED [ 81%]
tests/test_format.py::FmtTests::test_format_time_custom_formats_date_components PASSED [ 82%]
tests/test_format.py::FmtTests::test_format_time_custom_formats_time_components PASSED [ 84%]
tests/test_format.py::FmtTests::test_format_time_epoch_edge_cases PASSED [ 85%]
tests/test_format.py::FmtTests::test_format_time_with_different_default_values PASSED [ 86%]
tests/test_format.py::FmtTests::test_format_time_with_fractional_seconds PASSED [ 88%]
tests/test_output.py::OutputTests::testDisplayAllocations PASSED [ 89%]
tests/test_output.py::OutputTests::testDisplayFrames PASSED [ 90%]
tests/test_output.py::OutputTests::testDisplayHosts PASSED [ 92%]
tests/test_output.py::OutputTests::testDisplayJobInfo PASSED [ 93%]
tests/test_output.py::OutputTests::testDisplayJobs PASSED [ 94%]
tests/test_output.py::OutputTests::testDisplayProcs PASSED [ 96%]
tests/test_output.py::OutputTests::testDisplayServices PASSED [ 97%]
tests/test_output.py::OutputTests::testDisplayShows PASSED [ 98%]
tests/test_output.py::OutputTests::testDisplaySubscriptions PASSED [100%]
=============================================================================================================================================== 76 passed in 0.15s ================================================================================================================================================
==========================================
[INFO] All tests passed successfully! |
Collaborator
Author
|
pytest --cov=cueadmin --cov-report=term-missing =============================================================================================================================================== test session starts ===============================================================================================================================================
cachedir: .pytest_cache
configfile: pyproject.toml
testpaths: tests
plugins: mock-3.15.1, pyfakefs-5.9.3, cov-7.0.0
collected 76 items
tests/test_common.py::CommonArgTests::testSetFacility PASSED [ 1%]
tests/test_common.py::CommonArgTests::testSetServer PASSED [ 2%]
tests/test_common.py::CommonArgTests::testVerboseLogging PASSED [ 3%]
tests/test_common.py::ShowTests::testCreateShow PASSED [ 5%]
tests/test_common.py::ShowTests::testDefaultMaxCores PASSED [ 6%]
tests/test_common.py::ShowTests::testDefaultMinCores PASSED [ 7%]
tests/test_common.py::ShowTests::testDeleteShow PASSED [ 9%]
tests/test_common.py::ShowTests::testDisableBooking PASSED [ 10%]
tests/test_common.py::ShowTests::testDisableDispatch PASSED [ 11%]
tests/test_common.py::ShowTests::testDisableShow PASSED [ 13%]
tests/test_common.py::ShowTests::testEnableBooking PASSED [ 14%]
tests/test_common.py::ShowTests::testEnableDispatch PASSED [ 15%]
tests/test_common.py::ShowTests::testEnableShow PASSED [ 17%]
tests/test_common.py::ShowTests::testListShows PASSED [ 18%]
tests/test_common.py::AllocTests::testCreateAlloc PASSED [ 19%]
tests/test_common.py::AllocTests::testDeleteAlloc PASSED [ 21%]
tests/test_common.py::AllocTests::testInvalidRenameAlloc PASSED [ 22%]
tests/test_common.py::AllocTests::testListAllocs PASSED [ 23%]
tests/test_common.py::AllocTests::testListSubscriptionsForAlloc PASSED [ 25%]
tests/test_common.py::AllocTests::testRenameAlloc PASSED [ 26%]
tests/test_common.py::AllocTests::testReparentHosts PASSED [ 27%]
tests/test_common.py::AllocTests::testTagAlloc PASSED [ 28%]
tests/test_common.py::HostTests::testDeleteHost PASSED [ 30%]
tests/test_common.py::HostTests::testInvalidDeleteHost PASSED [ 31%]
tests/test_common.py::HostTests::testInvalidLockHost PASSED [ 32%]
tests/test_common.py::HostTests::testInvalidMoveHost PASSED [ 34%]
tests/test_common.py::HostTests::testInvalidSafeReboot PASSED [ 35%]
tests/test_common.py::HostTests::testInvalidSetFixed PASSED [ 36%]
tests/test_common.py::HostTests::testInvalidSetRepairState PASSED [ 38%]
tests/test_common.py::HostTests::testInvalidSetThreadMode PASSED [ 39%]
tests/test_common.py::HostTests::testInvalidUnlockHost PASSED [ 40%]
tests/test_common.py::HostTests::testListHosts PASSED [ 42%]
tests/test_common.py::HostTests::testLockHost PASSED [ 43%]
tests/test_common.py::HostTests::testMoveHost PASSED [ 44%]
tests/test_common.py::HostTests::testSafeReboot PASSED [ 46%]
tests/test_common.py::HostTests::testSetFixed PASSED [ 47%]
tests/test_common.py::HostTests::testSetRepairState PASSED [ 48%]
tests/test_common.py::HostTests::testSetThreadMode PASSED [ 50%]
tests/test_common.py::HostTests::testUnlockHost PASSED [ 51%]
tests/test_common.py::SubscriptionTests::testCreateSub PASSED [ 52%]
tests/test_common.py::SubscriptionTests::testDeleteSub PASSED [ 53%]
tests/test_common.py::SubscriptionTests::testListSubs PASSED [ 55%]
tests/test_common.py::SubscriptionTests::testSetBurst PASSED [ 56%]
tests/test_common.py::SubscriptionTests::testSetBurstPercentage PASSED [ 57%]
tests/test_common.py::SubscriptionTests::testSetSize PASSED [ 59%]
tests/test_common.py::JobTests::testListJobInfo PASSED [ 60%]
tests/test_common.py::JobTests::testListJobs PASSED [ 61%]
tests/test_common.py::ProcTests::testListFrameLogPaths PASSED [ 63%]
tests/test_common.py::ProcTests::testListProcs PASSED [ 64%]
tests/test_common.py::ServiceTests::testListDefaultServices PASSED [ 65%]
tests/test_common.py::ServiceTests::testListShowServices PASSED [ 67%]
tests/test_format.py::FmtTests::test_cutoff_edge_cases PASSED [ 68%]
tests/test_format.py::FmtTests::test_find_duration_with_mocked_time PASSED [ 69%]
tests/test_format.py::FmtTests::test_format_duration_precision_edge_cases PASSED [ 71%]
tests/test_format.py::FmtTests::test_format_duration_with_extreme_values PASSED [ 72%]
tests/test_format.py::FmtTests::test_format_duration_with_floating_point PASSED [ 73%]
tests/test_format.py::FmtTests::test_format_long_duration_precision_edge_cases PASSED [ 75%]
tests/test_format.py::FmtTests::test_format_long_duration_with_extreme_values PASSED [ 76%]
tests/test_format.py::FmtTests::test_format_long_duration_with_floating_point PASSED [ 77%]
tests/test_format.py::FmtTests::test_format_mem_conversion_precision PASSED [ 78%]
tests/test_format.py::FmtTests::test_format_mem_force_unit_edge_cases PASSED [ 80%]
tests/test_format.py::FmtTests::test_format_mem_with_decimal_inputs PASSED [ 81%]
tests/test_format.py::FmtTests::test_format_time_custom_formats_date_components PASSED [ 82%]
tests/test_format.py::FmtTests::test_format_time_custom_formats_time_components PASSED [ 84%]
tests/test_format.py::FmtTests::test_format_time_epoch_edge_cases PASSED [ 85%]
tests/test_format.py::FmtTests::test_format_time_with_different_default_values PASSED [ 86%]
tests/test_format.py::FmtTests::test_format_time_with_fractional_seconds PASSED [ 88%]
tests/test_output.py::OutputTests::testDisplayAllocations PASSED [ 89%]
tests/test_output.py::OutputTests::testDisplayFrames PASSED [ 90%]
tests/test_output.py::OutputTests::testDisplayHosts PASSED [ 92%]
tests/test_output.py::OutputTests::testDisplayJobInfo PASSED [ 93%]
tests/test_output.py::OutputTests::testDisplayJobs PASSED [ 94%]
tests/test_output.py::OutputTests::testDisplayProcs PASSED [ 96%]
tests/test_output.py::OutputTests::testDisplayServices PASSED [ 97%]
tests/test_output.py::OutputTests::testDisplayShows PASSED [ 98%]
tests/test_output.py::OutputTests::testDisplaySubscriptions PASSED [100%]
================================================================================================================================================= tests coverage ==================================================================================================================================================
________________________________________________________________________________________________________________________________ coverage: platform darwin, python 3.13.2-final-0 _________________________________________________________________________________________________________________________________
Name Stmts Miss Cover Missing
-----------------------------------------------------
cueadmin/__init__.py 0 0 100.00%
cueadmin/__main__.py 11 11 0.00% 19-38
cueadmin/common.py 457 120 73.74% 63-73, 437-478, 495, 505, 510, 514, 518-519, 527-532, 555-557, 559, 569-570, 573-578, 583, 604-621, 647-650, 655-658, 663-666, 671-674, 681-682, 689-690, 699-702, 707-718, 723-753
cueadmin/format.py 34 0 100.00%
cueadmin/output.py 88 1 98.86% 354
cueadmin/util.py 39 26 33.33% 33-38, 52, 67-89
-----------------------------------------------------
TOTAL 629 158 74.88%
=============================================================================================================================================== 76 passed in 0.25s ================================================================================================================================================ |
Collaborator
Author
|
black cueadmin tests && isort cueadmin tests All done! ✨ 🍰 ✨ |
Collaborator
Author
|
FYI .. I will update the CI/CD for tests of cueman and cueadmin in another pull request. |
Collaborator
Author
|
@DiegoTavares / @lithorus |
DiegoTavares
approved these changes
Sep 24, 2025
a9c8110
into
AcademySoftwareFoundation:master
20 checks passed
This was referenced Sep 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link the Issue(s) this Pull Request is related to.
Summarize your change.
[cueadmin] Enhance testing infrastructure, tooling, and documentation
Update
pyproject.tomlwith modern pytest configurationAdd
tox.inifor multi-environment testingImprove
README.mdwith testing documentationCreate
run_tests.shscriptRaise project quality standards
[docs] Expand cueadmin documentation
[cueadmin] Apply code formatting with black and isort